|
Posted by Michael Fesser on 07/20/07 08:33
..oO(Rik)
>On Fri, 20 Jul 2007 09:23:00 +0200, gagal <lynettesmith@gmail.com> wrote:
>
>> Warning: mysql_query(): supplied argument is not a valid MySQL-Link
>> resource in /home/smith/public_html/addressbook/ab_functions.php on
>> line 87
>> Query failed:
>>
>> function adminApprovalNeeded ($connect, $db_table4)
>> {
>> $sql = "SELECT * FROM $db_table4 WHERE 'approved' = '0'";
>> 87 --> $result = mysql_query ($sql, $connect) or die ('Query failed:
>> ' .mysql_error());
>> $approved = mysql_num_rows($result);
>> echo "Address Book - You have $approved entries waiting for
>> approval.";
>> }
>
>The error is earlier, in the connection or the assigning it to $connect
>itself. $connect does not hold a valid mysql-resource.
Additionally, if that's the real code, the query will never return
anything, because 'approved' will never be equal to '0' ...
Micha
[Back to original message]
|