Re: [PHP] php & mysql prob...
are you pass the two functions you return link from mysql_connect() or mysql_pconnect() ?? jim - Original Message - From: "sc" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 6:15 PM Subject: Re: [PHP] php & mysql prob... > mysql_error returns nothing, mysql_errno returns 0 > "Jim Lucas" <[EMAIL PROTECTED]> wrote in message > 03ad01c161b0$026caee0$[EMAIL PROTECTED]">news:03ad01c161b0$026caee0$[EMAIL PROTECTED]... > > mysql_error() and mysql_errno() return the value. > > > > $error = mysql_error($dblink); > > $errno = mysql_errno($dblink); > > or > > echo mysql_error($dblink); > > echo mysql_errno($dblink); > > > > jim > > - Original Message - > > From: "sc" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, October 30, 2001 6:01 PM > > Subject: Re: [PHP] php & mysql prob... > > > > > > > ok i thought it would be working, but on testing it more it still isn't > > > going for me i took off the ' ' from the table name and its still > > coming > > > up with an error on line 17 with the same error message... the > > mysql_error() > > > isn't echoing anything that has gone wrong.. (did before).. > > > > > > Any ideas? > > > > > > thx. > > > > > > -sc > > > "Jason Brooke" <[EMAIL PROTECTED]> wrote in message > > > 043f01c161a9$bf8d99a0$0100a8c0@co3040297a">news:043f01c161a9$bf8d99a0$0100a8c0@co3040297a... > > > > Or the single quotes around the table name in the sql string > > > > > > > > > > > > > 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. > > > > > > > > > > > > > > > > > > > > > > > > -- > > > 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]
Re: [PHP] php & mysql prob...
mysql_error returns nothing, mysql_errno returns 0 "Jim Lucas" <[EMAIL PROTECTED]> wrote in message 03ad01c161b0$026caee0$[EMAIL PROTECTED]">news:03ad01c161b0$026caee0$[EMAIL PROTECTED]... > mysql_error() and mysql_errno() return the value. > > $error = mysql_error($dblink); > $errno = mysql_errno($dblink); > or > echo mysql_error($dblink); > echo mysql_errno($dblink); > > jim > - Original Message - > From: "sc" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, October 30, 2001 6:01 PM > Subject: Re: [PHP] php & mysql prob... > > > > ok i thought it would be working, but on testing it more it still isn't > > going for me i took off the ' ' from the table name and its still > coming > > up with an error on line 17 with the same error message... the > mysql_error() > > isn't echoing anything that has gone wrong.. (did before).. > > > > Any ideas? > > > > thx. > > > > -sc > > "Jason Brooke" <[EMAIL PROTECTED]> wrote in message > > 043f01c161a9$bf8d99a0$0100a8c0@co3040297a">news:043f01c161a9$bf8d99a0$0100a8c0@co3040297a... > > > Or the single quotes around the table name in the sql string > > > > > > > > > > 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. > > > > > > > > > > > > > > > > > -- > > 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]
Re: [PHP] php & mysql prob...
mysql_error() and mysql_errno() return the value. $error = mysql_error($dblink); $errno = mysql_errno($dblink); or echo mysql_error($dblink); echo mysql_errno($dblink); jim - Original Message - From: "sc" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 6:01 PM Subject: Re: [PHP] php & mysql prob... > ok i thought it would be working, but on testing it more it still isn't > going for me i took off the ' ' from the table name and its still coming > up with an error on line 17 with the same error message... the mysql_error() > isn't echoing anything that has gone wrong.. (did before).. > > Any ideas? > > thx. > > -sc > "Jason Brooke" <[EMAIL PROTECTED]> wrote in message > 043f01c161a9$bf8d99a0$0100a8c0@co3040297a">news:043f01c161a9$bf8d99a0$0100a8c0@co3040297a... > > Or the single quotes around the table name in the sql string > > > > > > > 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. > > > > > > > > > > -- > 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]
Re: [PHP] php & mysql prob...
ok i thought it would be working, but on testing it more it still isn't going for me i took off the ' ' from the table name and its still coming up with an error on line 17 with the same error message... the mysql_error() isn't echoing anything that has gone wrong.. (did before).. Any ideas? thx. -sc "Jason Brooke" <[EMAIL PROTECTED]> wrote in message 043f01c161a9$bf8d99a0$0100a8c0@co3040297a">news:043f01c161a9$bf8d99a0$0100a8c0@co3040297a... > Or the single quotes around the table name in the sql string > > > > 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. > > > -- 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]
Re: [PHP] php & mysql prob...
On Wed, 31 Oct 2001 11:47, Jason Brooke wrote: > Or the single quotes around the table name in the sql string > > > 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. That's what I meant - but I was hoping he'd do a bit of work :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA This is Borg. is futile is inevitable -- 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]
Re: [PHP] php & mysql prob...
Yeah sorry about that, didn't mean to send out 3... Ok i got it working... thanks for all the replys... -sc "David Robley" <[EMAIL PROTECTED]> wrote in message 01103111392904.28397@www">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. -- 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]
Re: [PHP] php & mysql prob...
Or the single quotes around the table name in the sql string > 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. -- 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]
Re: [PHP] php & mysql prob...
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. -- 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] php & mysql prob...
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 -- 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]