[PHP-DB] Debugging/monitoring traffic to MySQL

2002-07-18 Thread Clive Bruton
Is there a way to see the traffic between PHP and MySQL, ie see the statements/raw data that is sent between the two processes. I've tried running the MYSQL client, but there doesn't seem to be any obvious command to do this. Some other terminal process? I'm running MacOS X. TIA. -- Clive

RE: [PHP-DB] Select a subset?

2002-07-16 Thread Clive Bruton
[EMAIL PROTECTED] wrote at 16/07/02 09:44 $result = mysql_query(SELECT COUNT(*) as numrows FROM table,$db); $row = mysql_fetch_array($result); $num_rows = $row['num_rows']; Joakim, thanks, that sorted it. Just one note, numrows in the sql query should be num_rows?

Re: [PHP-DB] Select a subset?

2002-07-15 Thread Clive Bruton
Adam Alkins wrote at 15/07/02 04:06 mysql_num_rows just counts the amount of rows in a query, so if you only selected 10 rows, it will return 10. If you want to count all the rows in the table, its best to use the COUNT() function SELECT COUNT(*) FROM table In my example, I've selected all