Category "mysqli"

MySQL connection and disconnection frequency

Is it better to open and close a new MySQL connection every time a query is made or to keep the connection open and run multiple queries in a single MySQL sessi

Query with MySQL event

I try to perform this query with Zend DB: $this->db->query(" CREATE EVENT turn_tonormal ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVA

Mysqli Output to a table

So my goal is to output some mysql info to a table. I want it to start a new column every 18th record. Here is my current code: $hostname = "localhost"; //SET

Query to get top 5 users by total month sales amount

I was hoping you could help me figure this out. I would like to run a query that would search a table and all it's rows and the date matches the current month.

MySQL server has gone away without huge data but due to long time

The script takes too much time and so I am getting this error. I will try to optimize it. I want advice, will using, mysql_pconnect is better than mysql_connect