From 210ae15841e2a34957b5ddfd0902eab041609f2f Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 28 Aug 2009 11:29:48 +0000 Subject: [PATCH] Silence SQL query. --- ykval-getapikey.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ykval-getapikey.php b/ykval-getapikey.php index 6db140d..9dd05a8 100644 --- a/ykval-getapikey.php +++ b/ykval-getapikey.php @@ -40,8 +40,10 @@ fclose ($fh); $b64rnd = base64_encode ($rnd); $query = "SELECT MAX(id) FROM clients"; -$result = query($conn, $query) - or logdie("code=maxiderror"); +if (!mysql_query($query, $conn)) { + debug("SQL query error: " . mysql_error()); + logdie("code=maxiderror"); +} $max = mysql_fetch_row ($result); mysql_free_result($result); $max = $max[0] + 1;