Re: php & mysql prob...
| From: | sc | Date: | Mon, 29 Oct 2001 01:30:31 +0000 |
| Subject: | Re: php & mysql prob... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-72949@lists.php.net to get a copy of this message | ||
Yeah sorry about that, didn't mean to send out 3...
Ok i got it working... thanks for all the replys...
-sc
"David Robley" <huntsman@www.nisu.flinders.edu.au> wrote in message
news:01103111392904.28397@www...
> On Wed, 31 Oct 2001 11:25, sc wrote:
> > Hi;
> >
> > i keep getting an error of: Warning: Supplied argument is not a valid
> > MySQL result resource in /datascripts/insertdata.php on line 17...
> >
> > Line 17 is: $row = mysql_fetch_assoc($test);
> >
> > and here is the rest of it (not all of it though):
> >
> > for ($p = 1; $p <= 24; $p++) {
> > $test = mysql_db_query("melbourne", "SELECT * FROM 'Port$p' WHERE
> > 'Port$p'.date='$yesterday'");
> > $row = mysql_fetch_assoc ($test);
> > $yindata = $row['switchin'];
> > $youtdata = $row['switchout'];
> > $dinPort = '$inPort$p' - $yindata;
> > $doutPort = '$outPort$p' - $youtdata;
> >
> > Can anyone help me overcome this prob? i've prob missed something
> > without thinking but i cant seem to get it...
> >
> > Thx.
> >
> > sc
>
> Er, want to be a little patient? That is three requests in seven minutes?
>
> Your query is probably broken - do some error checking after your
> database call with mysql_error() and see what the problem is.
>
> Guess; the table name.
>
> --
> David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
> CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
>
> "I know all the wherefores," said Tom wisely.