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

learn more… | top users | synonyms

1
vote
3answers
37 views

SQL trigger when a row is updated question

My problem is as follows. I an creating a SQL database for a company that whenever a row is updated on the DB i want to have a trigger that calls a cURL request to transfer the updated information to ...
0
votes
0answers
9 views

Show real time data to users with same response time

I've doubt regarding speed and latency for show real time data. Let's assume that I want to show read time data to users by fire ajax requests at every second that get data from MySql table by simple ...
0
votes
0answers
16 views

Local Server Management

I just started a new software development company, We are using Windows Server, with Wamp installed on the machine. The machine is connected to a router and we have 10 employees. But only 5 of them ...
0
votes
1answer
23 views

I am trying to run this code and I get an error at line 11 [on hold]

CREATE TABLE IF NOT EXISTS `tblproduct` ( `id` int(8) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `code` varchar(255) NOT NULL, `image` text NOT NULL, `price` double(10,2) NOT ...
0
votes
0answers
16 views

Cassandra “Operation timed out - received only 0 responses.” during write

I'm using Datastax PHP Cassandra Driver and Cassandra 2.2.5 on Windows 10. This is a single-node cluster, and the keyspace replication of { 'class': 'SimpleStrategy', 'replication_factor': 1 }...
0
votes
1answer
132 views

Moving data from one table (a million records in it) data to another table which in remote location? (MySQL)

I want to move data from one table which have more than 2 million records in size into another table which is in a remote machine, and that moving should support Logging Restart Exception handling ...
0
votes
2answers
5k views

query to select data between todays date as well as tomorrows date time upto specific time

I have database "raj" with table "pagination" In table pagination have "id", "actualtime" and "created" field id - auto_increment name- varchar created- datetime I want to display all rows which is ...
0
votes
1answer
253 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 ...
-1
votes
1answer
19 views

How can I create a church attendance report system?

Please am pretty new to php and mysql. I have an assignment to create a church attendance system for our weekly services. The system would be able to know how many males and females came to church ...
1
vote
1answer
10 views

What's the advantage of the inet datatype in Cassandra vs a plain text string?

What is the inet datatype really for? The documentation refers to its usage having something to do with Python but I'm not much of a Python guy so that aspect is beyond me. Is there any advantage to ...
0
votes
1answer
124 views

want to import exported xml file in wamp phpmyadmin

I have exported single table from wamp phpmyadmin as xml file for data verification and want to import it again into database as mysql table. Please give me guidance, how its possible?
0
votes
2answers
221 views

Best configuration for MySQL? InnoDB and MyISAM

I read that InnoDB is supposed to be better at writing into MySQL than MyISAM, however, I'm trying it out, by running 3000 MySQL queries(Inserting rows, 8 Columns + id)... but results haven't turned ...
0
votes
1answer
16 views

MYSQL inner join , if not match try another table

I've got a very quick issue here, how can i join a table with two other tables in a way if one's info doesnt match, it goes try another one. something like: $properties = $mysqli->query("SELECT *...
0
votes
0answers
14 views

Calculate class average where students offers different number of subjects

Please guys help me get the exact class average of a class. In this case the students in the class are offering different number of subjects, so a student in the same class can be offering 8 subject ...
0
votes
1answer
316 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 ...
0
votes
0answers
9 views

Moved MySQL server, new entries have wrong timestamp

Setup: Linux (Ubuntu 14.04) + MySQL Server 5.6 I've got a site where the website and MySQL server were running on the same machine, located in France. Now, I've gone ahead and moved the website and ...
0
votes
3answers
132 views

How do I echo data from two tables that are associated to one user in php

Say I have tbl_company with these cid------- cons_no-------- company_name ------- phone ------ address 1---------- q1----------------aple------------------------22222-------newyork 2 ------...
0
votes
1answer
17 views

How to make table with row name and column name

I am new to databases and now i came to a point where i need more complex table. I have a table which contains site details. Each site can have multiple devices. Each device have multiple measurement ...
-1
votes
1answer
40 views

Recovering a lost database [closed]

Before I start, there might not be a way to do this but I thought I would ask anyway.. I built a php application with Laravel 5.2 and have suddenly noticed I have lost the MySQL database for the ...
0
votes
2answers
433 views

How to select different format of the date in mysql

0 down vote favorite. I have this table and I can't change its format to yyyy-mm-dd because I have so many scripts that are related to this format dd-mm-yyyy. It would be a mess if I change its ...
0
votes
1answer
53 views

Reset MySQL table data after each session is completed in php

I am creating a PHP application demo. The users who login can insert, modify and delete data but when they logout the data must be reset to the default data I set before. The data must reset ...
-1
votes
0answers
12 views

how do we know if mysql server is overloaded [closed]

I am developing an application using PHP. Sometimes Mysql is overloaded. Is there anyway I can tell the user the database is overloaded & to come back later?
0
votes
1answer
214 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 ...
1
vote
1answer
222 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 ...
0
votes
0answers
5 views

invalid db driver in sql server codeigniter

At first when I don't have any codes in my models and controllers and views it does'nt show up until i run it with my codes This is my code: $db['default'] = array( 'dsn' => '', '...
0
votes
1answer
117 views

SQLAnywhere : Installation PHP extension - variable LD_LIBRARY_PATH not detected by extension

I'm trying to install the SQLAnywhere php extension to connect my website on a distant Sybase database. But I can't declare the LD_LIBRARY_PATH variable which isn't detected by the extension. A ...
1
vote
1answer
219 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. ...
0
votes
1answer
221 views

Suitable schema to record email sent and response received and invoicing in DB

When a form submission is made on a website: An email with form's details is sent to a set of recipients email addresses stored in a DB. The email contains a link for the recipient to show interest. ...
0
votes
0answers
24 views

PDO, create temporary table and select seem not to behave as expected

From a php cli script, I'm trying to create a temporary table and populatie it if it does not already exists. This works but is not optimised. By design, this script may try to execute the MySQL ...
0
votes
2answers
2k 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
1answer
169 views

Delete duplicate with same ID PHP/PDO/MYSQL

I'm new to databases and I need your help I'm working on a website and I have few problems. I'm using PDO. There is a user table, with unique ID, name and password. User enters his username and ...
0
votes
1answer
30 views

Can't login to sql server custom db

I have wamp installed in my system and sql server 2014, and configure so i can access sql server db through php.. with this code: <?php $serverName = "MY-PC\sqlexpress"; $connectionInfo = array(...
0
votes
1answer
23 views

How to get list of dates between From Date and To Date in MySQL [closed]

I have a table Emp_UnAvailablity_ID`, `PersonID`, `Is_UnAvailable`, `From_Date`, `To_Date` FROM `emp_unavailablity. I want to get list of all dates between From_Date and To_Date. I have tried this ...
0
votes
2answers
198 views

mysql too many connections in linux/nginx/php-fpm/php server

One of my mysql client reports "too many connections" of the mysql server. With the processlist of the mysql server, I find many connections come from a client with LNMP(linux nginx mysql php). The ...
0
votes
0answers
19 views

update data to table from another table and avoiding null values

i have two tables in mysql. Tbl1 - has product_id and tax_id fields. Tbl2 - has product_id and tax_id_w fields. Tbl1 needs to be updated (only values for tax_id field) from Tbl2 values of tax_id_w ...
0
votes
1answer
174 views

Error code 1064 when trying to add anything manually

So i tried adding via php and i noticed i got a error , so i went into phpmyadmin and tried adding it manually by clicking the SQL in phpmyadmin and write in INSERT INTO `test`(`IDtest`, `...
1
vote
2answers
633 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 ...
1
vote
1answer
236 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 ...
1
vote
0answers
12 views

I cannot fetch the value of a mysql alias [migrated]

I have the following code: $query = " SELECT distance, outcodepostcodes.lat, outcodepostcodes.lng FROM ( SELECT $table.*, outcodepostcodes.lat, outcodepostcodes.lng , outcodepostcodes.lat*3 AS ...
0
votes
2answers
25 views

Do dormant databases impact server performance?

On our web server, my team has been creating new databases in MySQL to manage backups. They simply create new database_DATE and copy over our live site. Which made me think today... Can having a ...
0
votes
2answers
147 views

SQL Query Help to get Quiz statistics

I'm coding a quiz web application and i need help. I've got three tables Nicknames : |USER_ID|NICKNAME| that stores USER_ID(auto increment) and NICKNAME registered to my system. Questions : |...
3
votes
0answers
106 views

Inputting auto-incrementing, grouped, unique hashes?

Alright, here's what I've come up with so far: SET @id=(SELECT IFNULL(MAX(id) + 1, 0) FROM leads); UPDATE leads SET id=@id WHERE id IN ( SELECT id FROM (SELECT * FROM leads) AS something WHERE ...
3
votes
3answers
855 views

Which graph database for search engine and gis? [closed]

I just learned there are "graph databases" out there, which are more suited for two applications "search engine" and especially "gis". To avoid discussions whether a relational DB is better suited ...
1
vote
2answers
140 views

Efficient workflow/queries to save unique information?

I am saving company information in a database. There is a single table with an auto-incrementing key that is unique to each company. There are separate tables for emails, websites, phone numbers, and ...
1
vote
1answer
381 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
538 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 ...
-3
votes
0answers
18 views

date wise convert row to column with sum of amount in mysql

i want dynamic table for dynamic date wise with sum of amount....plz help me guys.. Thanks in advance
1
vote
1answer
410 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
0answers
16 views

log_bin_trust_function_creators deterministic always throws an error on server restart [duplicate]

Everytime my rackspace server restarts because of some maintenance or an outage, all of my mysql functions stop working due to this deterministic error. To fix this, I have to manually pull up the ...
1
vote
1answer
803 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 ...