Re: [PHP] Driving me nuts, need one second of your time

2002-03-18 Thread Erik Price
On Friday, March 15, 2002, at 06:14 PM, cosmin laslau wrote: > Thanks in advance for whoever sees what I am sure is a glaring and > obvious flaw in the coding. I've been looking at it for an hours and > just can't get anything from where I'm standing, maybe a different > perpective will help

Re: [PHP] Driving me nuts, need one second of your time

2002-03-16 Thread scott furt
It's not absurd at all. What is absurd is that you're coding without checking for any error conditions :-) As a rule of thumb, if a function returns a success flag, check it. it'll immediately cut out about 90% of all "weird" errors. cosmin laslau wrote: > $query = "SELECT * from mytable"; >

Re: [PHP] Driving me nuts, need one second of your time

2002-03-15 Thread Steve Cayford
It looks like your sql query failed, so the result is invalid. Assuming that this is really the whole script, then you're counting on the mysql_db_query function to open a connection to the database "db" using the default connection values which (according to the manual) are host: localhost, u

RE: [PHP] Driving me nuts, need one second of your time

2002-03-15 Thread Darren Gamble
Good day, You get this message because the mysql_db_query statement failed, and that your code didn't check to see that it did or not before proceeding to the next statement. And, this statement fails because you have not even connected to the database yet. At the risk of sounding condescending