This happened to me when I used _affected_rows instead of _count

make sure you're using the right function.

that drove me nuts before I got it working, AND I followed the durn directions.

chris



On Tue, 10 Apr 2001 09:02:32 -0700, elias wrote:

>can you show me some code?
>basically when you provide an invalid link to any MySql function this error
>occur.
>
>-elias
>http://www.kameelah.org/eassoft
>
>""Nathan Roberts"" <[EMAIL PROTECTED]> wrote in message
>9atdps$kgv$[EMAIL PROTECTED]">news:9atdps$kgv$[EMAIL PROTECTED]...
>> I am trying to get to grips with managing data in mysql, am am currentky
>> working on deleting records
>>
>> I have worked through a turorial - no problems, but now I am trying to
>apply
>> it to my own database, I am getting the error
>> Warning: Supplied argument is not a valid MySQL result resource in .... on
>> line 14
>>
>> I cannot see what is causing it - if anyone can it would be much
>> appreciated.
>>
>> thanks
>>
>> Nathan
>>
>> For clarity/brevity I have cut the page back to what i beleive to be the
>> relivant part. Code for page is:-
>>
>> <html>
>>
>> <body>
>>
>> <?php
>>
>> $db = mysql_connect("localhost", "username", "pasword");
>>
>> mysql_select_db("catalogue",$db);
>>
>>
>>     $result = mysql_query("SELECT * FROM SECTIONS",$db);
>>
>>     while ($myrow = mysql_fetch_array($result)) {
>>
>>       printf("<a href=\"%s?section_id=%s\">%s %s</a> \n", $PHP_SELF,
>> $myrow["section_id"], $myrow["section_name"], $myrow["section"]);
>>
>>    printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a><br>", $PHP_SELF,
>> $myrow["section_id"]);
>>
>>     }
>>
>>
>>   ?>
>>
>>
>>
>> </body>
>>
>> </html>
>>
>>
>> SQL for the table is
>>
>> CREATE TABLE SECTIONS (
>>    section_name varchar(25) NOT NULL,
>>    section_id tinyint(3) unsigned DEFAULT '0' NOT NULL auto_increment,
>>    section char(1) NOT NULL,
>>    PRIMARY KEY (section_id),
>>    UNIQUE section (section_name, section_id, section)
>>
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to