View Single Post

  #8 (permalink)  
Old 02-04-2005
Pieter
 
Posts: n/a
Default Re: mysql_fetch_array():

On Fri, 04 Feb 2005 08:36:07 -0500, Brandons of mass destruction <junkie46@comcast.net> wrote in 44 Lines :

>In article <ctvg9i$bbu$2$8302bc10@news.demon.co.uk>,
> Colin McKinnon <colin.deletethis@andthis.mms3.com> wrote:
>
>> Brandons of mass destruction wrote:
>>
>>
>> > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
>> > result resource in /httpdocs/ticky.php on line 3
>> >
>> > Here's the first three lines of that "ticky.php"
>> >
>> > 1: <?
>> > 2: global $headlines;
>> > 3: while ( $row = mysql_fetch_array($headlines) )
>> >
>> > I don't understand why this would spit out an error. Do i need to
>> > declare $row variable in this doc?

>>
>> Try mysql_error() before and after the query.

>
>Note quite sure how to do that, so I added this
>
>echo mysql_errno($headlines) . ": " . mysql_error($headlines). "\n";
>
>after line 3 and got the following errors:
>
>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
>result resource in
>/home/httpd/vhosts/connectsavannah.com/httpdocs/ticker.php on line 3
>
>Notice: Undefined variable: tickerlogo in
>/home/httpd/vhosts/connectsavannah.com/httpdocs/ticker.php on line 12
>
>Notice: Undefined variable: section in
>/home/httpd/vhosts/connectsavannah.com/httpdocs/ticker.php on line 12
>
>Notice: Undefined variable: siteaddress in
>/home/httpd/vhosts/connectsavannah.com/httpdocs/ticker.php on line 13
>
>Notice: Undefined variable: siteaddress in
>/home/httpd/vhosts/connectsavannah.com/httpdocs/ticker.php on line 19
>
>Notice: Undefined variable: section_link in
>/home/httpd/vhosts/connectsavannah.com/httpdocs/ticker.php on line 19


If I uunderstood you right, you was using somebodyelse his code.
This is sometimes a problem, because the originale writer has the rest of the files.
Because you try to put out 1 file for testing, you are in trouble.

Try to cleanup the code with to remove all the garbage code that you don't use.

Mostly what I do, is just to cut&past code that I try.

Pieter [NL}

Reply With Quote