Professional Hypertext Preprocessor, a widely used platform for dynamic web applications.

learn more… | top users | synonyms

1
vote
0answers
12 views

fast execution analitycs database with thousand rows to displaying in php [migrated]

i've table with a thousand rows and i want to creating analitycs with chart display my front end php my table structure is and how i display this data : by user_agent column i display operating ...
0
votes
1answer
40 views

compare results between two select queries mysql

i'm making test application where users will input their select queries in input box and the application have to compare them if they are identical with "correct answer" query. "Correct answer" query ...
1
vote
1answer
321 views

Update table from calculated temporary table

I have two tables, one containing a set of user ID's, vote direction (-1 or 1) and ID of the object they voted on (casted votes table). In the other table, the object id, upvotes, downvotes and ...
0
votes
0answers
19 views

Best practice to create a database schema for Open Auth (Social logins)

I've done a database schema for user management alongs with their roles and permissions. The problem actually began, when I decide to integrate a multiple "Open Auths" such as Facebook Login, Google ...
2
votes
0answers
131 views

Sync a local MySQL database and a live server MySQL database

I want to store data in my local MySQL database and after a time interval or when system connected to internet it will update my live MySQL database remotely. Is it possible? I have an inventory ...
0
votes
1answer
248 views

MySQL: SELECT GET_LOCK slow/timeout

I am using "Zebra Session" as a replacement for PHP's built-in session management. Zebra Session stores sessions in a MySQL database, and uses "session locking" in order to ensure that data is ...
0
votes
1answer
245 views

Quickly establishing if a remote MySQL connection is valid using PHP

I have a hosted website (Namecheap Pro shared hosting) that connects to a remote MySQL database using a read-only user privilege. This remote DB is updated by a separate system. The website works ...
0
votes
1answer
25 views

Updating the mongodb doccument using php

I want to update my older entries through the PHP interface in MongoDB. First, I get data from the text fields and then store that into variables. Then I use those variables to update data in Mongodb. ...
0
votes
1answer
2k views

MySQL PDO Cannot assign requested address

Can someone help me with this error? [08-Apr-2013 17:44:08 Europe/Berlin] PHP Warning: PDO::__construct(): [2002] Cannot assign requested address (trying to connect via tcp://****:3306) in ...
1
vote
1answer
19 views

How to update a whole document in MongoDB using PHP?

I want to update my older entries through the PHP interface in MongoDB. First, I get data from the text fields and then store that into variables. Then I use those variables to update data in Mongodb. ...
1
vote
0answers
33 views

insertion creates duplicate with same data

I am using MySQL with PHP. I fetch data from a third party using SOAP. I have an issue with duplicate insertion of data. This occurs once or twice a day. Say there are 10 records ready to enter into ...
-1
votes
1answer
32 views

Pivot data - dynamic column names [duplicate]

I am trying to pivot data. The column names have to be dynamic based on the row values for subject_id column. Table Sid marks subject_id 101 20 3 101 25 2 101 60 1 104 22 3 104 ...
2
votes
0answers
29 views

Connecting to SQL Server using PHP, ODBC, and Windows authentication [migrated]

I'm trying to use PHP to connect to an ODBC data source using Windows authentication. I can connect just fine to the server in SQL Server so I know it's running. When I try to run the command ...
0
votes
2answers
294 views

MYSQL Master-Slave replication not working with PHP

My data gets replicated from the master database when I do it manually but when it gets inserted from PHP into the master database it doesn't get replicated to the slave database. My Master database ...
1
vote
2answers
231 views

MYSQL joining 3 tables with left join

I have these tables: pupils: (id_pupil, name, surname, email, user, pass, level, class) incidents: (id_incidents, date, time, type_incident, comments, id_pupil, id_user, subject, id_trimester) ...
1
vote
2answers
54 views

MySQL “case as column” question in WHERE clause

I'm setting up a new column with this case statement: SELECT * , CASE t2.field_max_occupancy_value WHEN 'one' THEN 1 WHEN 'two' THEN 2 WHEN 'three' THEN 3 WHEN 'four' THEN 4 WHEN 'five' ...
0
votes
2answers
195 views

Mysql connect without username/password

I build a new website for a client (WordPress is underlying) and have access trough FTP to his webspace. He does not provide or even know more informations than this because he had taken it from an ...
2
votes
0answers
16 views

selecting data from joomla back end mysql

I have developed a front-end that call a php server side service that adresses the mysql. On my local everything works perfectly, but on distant 1and1 machine, it only works for tables created by ...
1
vote
1answer
241 views

Insert GEOMFROMTEXT (lat lng)

I am stuck, please help. The following SQL statement works: "INSERT INTO `routeplans` ( `polygon` ) VALUES ( GEOMFROMTEXT( 'POLYGON( (39.593254951279626 -119.2415714263916, 39.596231192849004 ...
2
votes
1answer
43 views

How to add DATETIME value for session user

I am maintaining two tables: Employee table consists of username and password(for logging in) log table consists of login and logout time for the session user With the click of a button, I should ...
0
votes
1answer
850 views

Even after permissions are updated, I still get the error permission denied for relation users

I'm getting the error ERROR: permission denied for relation users and have tried to update privileges using both grant all privileges on all tables in schema ops to my_user GRANT ALL PRIVILEGES ON ...
1
vote
1answer
59 views

MYSQL - Timeclock Count Hours In/Out for each day of current week

Below is my table for my database timeclock that records each record of an employee clocking in/out. I am wanting to create a function that returns hours for each day Monday-Sunday of current week. ...
1
vote
2answers
12k views

Insert data in current table and update another table MySQL

I'm having problem with inserting in purchase table and updating facility table. Let's say, user made a purchase with product_id and product_quantity. When user hit submit, I want to insert ...
0
votes
1answer
151 views

MySQL taking significantly longer to query via PHP than CLI

TL;DR: I have a query that takes under a second to run via MySQL's CLI, but over 12 minutes via PHP and I'm at a total loss on what to check next. It's a fairly horrid query, full of joins, but the ...
2
votes
1answer
586 views

Calculating the median value in a MySQL table with CodeIgniter

This is my model file in codeigniter. I need to calculate the median for this variable: budget_breakdown.breakdown_grants. How can I do this calculation? function reports_details1() { ...
1
vote
1answer
113 views

PHP / MYSQL connection failures via socket under moderate load

I've done quite a bit of reading before asking this, so let me preface by saying I am not running out of connections, or memory, or cpu, and from what I can tell, I am not running out of file ...
0
votes
1answer
25 views

Can I split mysql the search results into two tables in php?

I have index tables with multiple columns: s | s1 | s2 | s3 | s4 | s5 | s6 | s7 | s8 | s9 | s10 | s11 | s12 | ------------------------------------------------------------------- 0 | 1 | 0 | 1 | 1 ...
0
votes
1answer
205 views

No connection could be made because the target machine actively refused it. MYSQL work bench?

I have created php and Mysql site.Its Working Locally Xampp well. Finally I moved My site to server..i have Used Mysql Workbench. connected client database in Mysql Workbench in My system.when I Run ...
1
vote
1answer
127 views

Reviewing relational database tables

I am building a database, but I am a little bit confused with my table relationships. I wish someone could help review my table relationships below for me and tell me where I am going wrong. I have ...
0
votes
2answers
191 views

No connection could be made because the target machine actively refused it

I have created a PHP site using MySQL. It works well on localhost. However, when I moved it to a remote server, it stopped working. The error shown is: "No connection could be made because the ...
0
votes
0answers
173 views

Inserting emoji - smartphones in MySQL database with PHP? [migrated]

Well with the the asks from is quite high explanatory will only strengthen the question. APP have a chat system which be late the HTML , send it to PHP with ajax , but the usurer try to insert some ...
-1
votes
0answers
47 views

How to check if all days of the month are in the database

This is my table wys_attendence: id studid adate amonth ayear acls_id attendence 1 28 02 07 2015 10 1 2 31 02 07 2015 10 0 4 ...
2
votes
0answers
20 views

Caching impression counts to avoid mysql inserts

We currently get a lot of mySQL inserts/updates on duplicate daily (millions) and we're looking at speeding up the application by using some form of counter with memcached and then clearing it on ...
1
vote
0answers
23 views

Caching impression counts to avoid mysql inserts

We currently get a LOT of mySQL inserts/updates on duplicate daily (millions) and we're looking at speeding up the application by using some form of counter with memcached and then clearing it on ...
0
votes
0answers
22 views

How to populate values in drop down list in php postgresql [migrated]

I am getting error while populating the values in drop down list using php postgresql. Error means no output in drop down list. Below is my code. <!DOCTYPE html> <html> <body> ...
0
votes
2answers
199 views

MySQL - prevent OS cache for query

On high load production server I have many sql selects which are unique or re-use will be in hours. I use SQL_NO_CACHE but this queries are still cached with OS cache. Server have 64G ram and used ram ...
-2
votes
2answers
35 views

How can i get list of postgresql database through php or using just sql query? [duplicate]

What i want to do is to make a drop down list of all the databases of my postgresql 9.3 server using php . if i can get just the sql script that can do the trick then i can handle the php part. ...
0
votes
1answer
211 views

How to check mysql password change and other events logs

Recently someone change my phpmyadmin password and drop database I think it was sql injecting. Now I want to find information about this like when, how and who change my password Please tell me ...
1
vote
0answers
21 views

MySQL/Eloquent belongsToMany relation - two tables same pivot table allowed? [migrated]

Is it allowed to have two tables, each with a belongsToMany() relation to each other, using the same pivot table? Here is my User table: And here is my Org table: And here is the pivot table: ...
0
votes
1answer
44 views

How to use explode mysql function in where condition with cakephp

I am using cakephp 2.6. I have payment_method fields in mysql table which store the values like 54,52,59,57 . Now my question is that how can i check if new posted payment method id is available in ...
1
vote
0answers
15 views

Can I install php 5.6.10 and mysql 5.6 in flash drive [migrated]

I want to use the latest version of Apache PHP and MySQL in flash drive And then I'll use it for any computer
0
votes
1answer
25 views

Where are tempory tables or record sets located?

Using mysql and php, I would like to understand where temporary results are stored. For instance, when I do a query that returns a set of data for processing by php, is the connection to the database ...
0
votes
0answers
11 views

Spreading out iops use at Aws

Is there a way to store event info, such as those triggered by a listened to Dom event, and feed that info into a database at a specific rate? Using Aws databases usually means provisioning a set ...
1
vote
1answer
47 views

MySQL Enterprise Connector/PHP Plugin for php 5.4 [closed]

I'm trying to setup mysqlenterprise.so. I have installed the native driver and loaded before mysqlent, but when I try to start it I got: Starting php-fpm: [14-Jul-2015 14:27:40] NOTICE: PHP message: ...
1
vote
0answers
31 views

How to deal with large amounts of data - PHP [closed]

I'm currently making a postage website using php, laravel and phpmyadmin. I have a list on postcodes for different areas and each area will have a different price. E.g. Area 1 - England, Area 2 - ...
3
votes
1answer
65 views

Skip specific field name

I am trying to execute a table from a MySQL database using a for loop statement, in order to get the field names as the column header. Here is my code: $result = mysql_query("SELECT * FROM ...
3
votes
2answers
73 views

Missing DB entries

I have run into a problematic situation. I oversee the administration of 5 php web pages on one server, each having their own database. All pages work like interactive forms drawing and storing data ...
-2
votes
1answer
51 views

Is a normalized MYSQL DB faster than one organized with comma strings?

I've always used databases with comma-separated id strings, something like +------+--------------+ | id | users | +------+--------------+ |1 |2,4,5,6,12 | +------+--------------+ ...
1
vote
1answer
37 views

Hostgator php code error while creating a new database table

Error is Error creating database: Access denied for user ''@'localhost' to database 'my_db' Code is { <?php $link=mysql_connect ("localhost", "cpuser_dbuser", "password") or die ('I cannot ...
2
votes
4answers
2k views

How to subtract fields and insert the value in other field automatically?

id val1 val2 total 1 10 4 10-4(automatically get the value) . . . . I am using php and mysql. I have a total column I need to make calculation automatically in a field, how it ...