Martin Olsson wrote:
I tried this before: <?php connectToDatabase(); $result = mysql_query("SHOW VARIABLES"); $row = mysql_fetch_assoc($result); echo "VALUE=" . $row['max_allowed_packet']; ?>
But this does not work, as SHOW VARIABLES seems to be console only; not a valid query.
Try looking at the result of "SHOW VARIABLES". It's not just one row. It's one row for each variable, with the column names "Variable_name" and "Value".
If you're just interested in max_allowed_packet, you can eliminate the part of the result set you won't be using by changing the query to
SHOW VARIABLES LIKE 'max_allowed_packet';
and then looking at $row['Value'] for the one row that's returned.
-- Keith Ivey <[EMAIL PROTECTED]> Smokefree DC http://www.smokefreedc.org Washington, DC
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]