Re: Functions and arguments
| From: | R0x0r Mc0wnage | Date: | Thu, 30 Jan 2003 01:49:34 +0000 |
| Subject: | Re: Functions and arguments | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133578@lists.php.net to get a copy of this message | ||
> What happens when you run this?
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in
/home/virtual/site125/fst/var/www/html/atracker/assignments/index.php on
line 15
ID Number Name Created by Created on Due on Class
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in
/home/virtual/site125/fst/var/www/html/atracker/assignments/index.php on
line 33
There's a lot more mysql_fetch_array warnings, with varying lines. The two
lines in question above are:
:::::::::::::::::::::::::::::CODE:::::::::::::::::::::::::::::
$classes = mysql_query("SELECT period1, period2, period3, period4, period5,
period6, periodpaws, period0 FROM students WHERE id = $id");
$classes_array = mysql_fetch_array($classes);
:::::::::::::::::::::::::::::CODE:::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::CODE:::::::::::::::::::::::::::::
$class_info = mysql_query("SELECT * FROM classes WHERE $id =
".$classes_array[period0]);
$class_info_array = mysql_fetch_array($class_info);
:::::::::::::::::::::::::::::CODE:::::::::::::::::::::::::::::
Would I be getting this kind of error if $id was not set correctly? I was
doing a bit of testing and for some reason my sessions aren't registering or
something :\