Re: [PHP] sql query successful

2001-07-18 Thread Dave Freeman
On 18 Jul 01, at 13:24, Tyler Longren wrote: From: "Tyler Longren" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Date sent: Wed, 18 Jul 2001 13:24:32 -0500 Subject: [PHP] sql query succ

Re: [PHP] sql query successful

2001-07-18 Thread David Robley
On Thu, 19 Jul 2001 03:54, Tyler Longren wrote: > Hello everyone, > > I've been writing database enabled site for quite a while now. One > thing I have never figured out it how to determine if a sql query is > successful. > > This works: > if ($connection = mysql_connect("host","username","passwo

RE: [PHP] sql query successful

2001-07-18 Thread Mark Roedel
> -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 18, 2001 1:36 PM > To: Mark Roedel; php-general > Subject: Re: [PHP] sql query successful > > > What about when DELETING from a table??? It always returns true. >

RE: [PHP] sql query successful

2001-07-18 Thread Christopher Ostmo
Mark Roedel pressed the little lettered thingies in this order... > > -Original Message- > > From: Christopher Ostmo [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 18, 2001 2:43 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] sql query successfu

Re: [PHP] sql query successful

2001-07-18 Thread Christopher Ostmo
Tyler Longren pressed the little lettered thingies in this order... > What about when DELETING from a table??? It always returns true. > Example...the highest ID in this table is 10: > > if ($connection = mysql_connect("localhost","mysql","mysql")) { > print "Connection established"; >

RE: [PHP] sql query successful

2001-07-18 Thread Mark Roedel
> -Original Message- > From: Christopher Ostmo [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 18, 2001 2:43 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] sql query successful > > > Your statement above is checking to see if the fact that $sql > is e

Re: [PHP] sql query successful

2001-07-18 Thread Christopher Ostmo
Tyler Longren pressed the little lettered thingies in this order... > Hello everyone, > > I've been writing database enabled site for quite a while now. One thing I > have never figured out it how to determine if a sql query is successful. > > This works: > if ($connection = mysql_connect("hos

Re: [PHP] sql query successful

2001-07-18 Thread Tyler Longren
x27;t this work??? Tyler - Original Message - From: "Mark Roedel" <[EMAIL PROTECTED]> To: "Tyler Longren" <[EMAIL PROTECTED]>; "php-general" <[EMAIL PROTECTED]> Sent: Wednesday, July 18, 2001 1:30 PM Subject: RE: [PHP] sql query successf

RE: [PHP] sql query successful

2001-07-18 Thread Hoover, Josh
I believe you should use the error function for the database you're using to check for failed queries. If you're using MySQL (which it appears that you are), you would do something like this: $sql = mysql_query("SELECT * FROM table ORDER BY rand()"); if(mysql_error()) echo "SQL not exec

RE: [PHP] sql query successful

2001-07-18 Thread Mark Roedel
> -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 18, 2001 1:25 PM > To: php-general > Subject: [PHP] sql query successful > > > I've been writing database enabled site for quite a while > now. One thing I

[PHP] sql query successful

2001-07-18 Thread Tyler Longren
Hello everyone, I've been writing database enabled site for quite a while now. One thing I have never figured out it how to determine if a sql query is successful. This works: if ($connection = mysql_connect("host","username","password")) { print "Successful connection": } else { print "No