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

learn more… | top users | synonyms

1
vote
1answer
334 views

How to select different format of the date in mysql

0 down vote favorite i have this table and i cant 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 iam gonna change ...
0
votes
1answer
179 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 ...
0
votes
0answers
12 views

Error: “mod_fcgid: can't apply process slot for” makes my server unresponsive for a period of time

Following error keeps appearing in my PHP error_log mod_fcgid: can't apply process slot for So far I pinpointed this issue to following settings in httpd.conf FcgidMaxProcessesPerClass 8 ...
0
votes
0answers
21 views

MySQL count multiple values in one column by PHP [migrated]

This my data in Column interested (Education; Job) I use this code: $sql3="SELECT interested, COUNT(*) as Education FROM register GROUP BY interested"; if ($result3=mysqli_query($con,$sql3)) { ...
-2
votes
0answers
16 views

My login page is returning Unknown column 'sitlanic' in 'where clause'

My login page is returning: Unknown column 'sitlanic' in 'where clause' $uname = $_POST['name']; $pass=$_POST['b']; $sql="select*from names where username=$uname and password=$pass"; ...
0
votes
2answers
32 views

Spanish characters saved incorrect in Mysql

I have googled this already, but I couldn't find what's wrong in my situation. I have a wordpress site that has a lot of non-english users which type in words such as "español" it is printed ...
0
votes
1answer
183 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
0answers
15 views

Sum data from 3 tables(joining), but one of may no data then other tables data will show

I am making a stock group summary report for this I am making Sum data from 3 joining tables, but one of may no data then other tables data will show. I have 3 tables as: ac_stock_item, ...
22
votes
2answers
40k views

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

Hello I am trying to run a website sent to me but after doing so this error appeared connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "4X.XXX.XX.XXX", user "userXXX", database ...
0
votes
1answer
42 views

Copy table form MS-SQL server to MySQL, is it possible? [closed]

I have a procedure, say "proc1", inside a MS-SQL server. I would like to create a table (copy of proc1) inside a MySQL server. So far what I do is this: 1-Create a connection to MS-SQL Server 2- run ...
1
vote
0answers
18 views

implement geo / spatial / proximity search with php and mysql — what have you done successfully

For my website's users, I want to implement a worldwide geo / spatial / proximity search with php and mysql. I want to do this as simply and minimally as possible. What is the minimum data I should ...
-1
votes
0answers
26 views

update other column in mysql table from concat and substr values from first column and variables in php [closed]

I need a help regarding this. How to Update second and third column in MySQL table from substr and concat values from first column along with variables in php. My query is: mysql_query ('UPDATE ...
2
votes
2answers
276 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
1answer
207 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
30 views

Different types of users in one table, How to add data off different users

I have 5 type of users: Super Admin Coordinator Supervisor Student External Examiner All of them have some common attributes like ID, name, email etc. I have inserted them in one table user ...
0
votes
1answer
161 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. ...
-1
votes
0answers
20 views

How to fill data of PostgreSQL into combobox using PHP [migrated]

I want to fetch data from PostgreSQL into my popup box. In the popup window, two comboboxes are there and on these comboboxes I want to fetch data from SQL into comboboxes. Here is the code of popup ...
1
vote
1answer
121 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
2answers
114 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 : ...
1
vote
2answers
23 views

Fulltext searching on shared hosting - 2000 Entires with around 500 words each

I'm fairly new to db administration and would appreciate some help. I want to host a site which requires full text search on around 2000 items, each with around 500 words each. I need this to be ...
0
votes
2answers
24 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
2answers
403 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 ...
0
votes
2answers
1k 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 ...
1
vote
2answers
485 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
votes
1answer
106 views

Grouping by each user's statuses or activity datetime

I’ve been trying to figure out in what best way I can implement a stream of activities, that groups a user’s activities that were done on a specific date where the time hh:mm:ss doesn’t differ much ...
0
votes
1answer
322 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
0answers
30 views

Fetching data from 3 tables

Wanna fetch data from 3 tables by mysql query to display in feed. But stack. My query is "SELECT f.leaderId, f.followerId, c.ccId, c.ccTitle, c.ccCity, c.ccCountry, c.ccFlag, c.uId, ...
0
votes
1answer
384 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 ...
5
votes
1answer
19 views

Execute query cache on startup - Reasonable?

I have a rather database intensive application for a server which is intended to be turned off and on throughout the day. The issue comes at first use of the application after startup; it is slower ...
0
votes
2answers
141 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
277 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
4answers
3k views

Insert if NOT EXISTS not working

I am trying to copy data from table to another mysql table from two different databases First I get all data from first table and stored them into php variable then I loop on that var to insert data ...
3
votes
1answer
49 views

Creating a query to pull very specific information using four tables

I have four tables, with a structure like this: testData This table holds all test data for every user. Each row associates one response for a question, divided up by test. A user can have many ...
1
vote
0answers
21 views

How to upload a large file (above 15 MB) in MYSql database, using Codeigniter [closed]

How to upload a large file (above 15 MB) in MYSql database, using Codeigniter. When I try to upload a file of size 15MB, I get this error Fatal error: Allowed memory size of 67108864 bytes ...
0
votes
1answer
214 views

MySQL search comma separated keywords

I have keywords column in my table and there are comma (,) separated values. example: hello, world I have search engine with same codes: $search = $_GET ['search']; $query = $db->prepare("SELECT ...
1
vote
1answer
470 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 ...
2
votes
0answers
48 views

MySQL high performance difference between two similar databases

I'm currently upgrading from TecDoc 2015 Quarter 2 database to TecDoc 2015 Quarter 4 database. Q2 Database: 240,838,107 rows InnoDB utf8_general_ci 23.2 GiB Q4 Database: 265,508,380 rows ...
6
votes
1answer
35k views

How to get rid of “maximum user connections” error ?

I am using MySQLi for my webapp but whenever I want to visit some particular page, I get mysqli_connect() [function.mysqli-connect]: (42000/1203): User ***_user already has more than ...
0
votes
0answers
17 views

Error on connecting to mysqli

I have a virtual server that I'm running MySQL Server on that and Operation System is Windows Server 2012. from my own System I mean home PC , easily I can connect remotely to MySQL Server without ...
0
votes
1answer
238 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
1answer
22 views

SELECT with equal chance between same IDs - MySQL

How can I SELECT data with equal chances for same IDs in MySQL (for php). For example, assume below data structure: id value 1 alfa 1 beta 1 gamma 2 hello 2 bye 3 sky I want ...
0
votes
1answer
122 views

Retrieving month from date field in my database

I have dates stored in database with the function : CURDATE() , when a user makes an order . With a form where the admin chooses the month and the year, I want a query to display all the orders made ...
1
vote
2answers
279 views

MySQL - prevent OS cache for query

On a 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 these queries are still cached with OS cache. The server has 64G ram and ...
0
votes
2answers
17 views

Migrating Pure PHP Site with Associated Database To New Server

First, let me say I'm not a DBA or network admin, but have moved large scale CMS websites from host to host. But, I have never moved a pure php coded database driven website from one host to another. ...
1
vote
1answer
89 views

How does mysqldbcopy function

I have a database called LIVE and I want to create a scenario were I copy the LIVE database every night at 2:30 am. I want the copied database to be called REPORT. So every night I want the REPORT ...
1
vote
2answers
23 views

How to subtract an object from another in PHP/MySQL?

I am printing totalbooks with this code: $query ="select sum(copies) as totalbooks from booksdetail"; $result=mysqli_query($con, $query); while($row=mysqli_fetch_array($result)){ echo ...
0
votes
0answers
41 views

SET FOREIGN_KEY_CHECKS=1; Commands out of sync; you can't run this command now

I am getting errors that I do not know how to solve using MySQL and php. The error is this... SET FOREIGN_KEY_CHECKS=1; Commands out of sync; you can't run this command now I am trying to run the ...
0
votes
1answer
39 views

table design for display content

In my previous work station, I saw them have a table design across all website they have worked on displaying editor content like this: column|page_id| title |content_1|... |content_n| lang ...
0
votes
1answer
65 views

MySQL shows previously deleted data

We're running MySQL on Azure. We have three very small databases. The main database is POI and it hold 11 static records. During the day a few records may be added and deleted again within 1-2 hours. ...
0
votes
0answers
27 views

Auto Insert new entry's in different database

I have 2 websites with similar MySQL database and both on same server (Linux) When a user register on website A I want to copy the user data to website B database (adb.users to bdb.users). Is there a ...