Re: [PHP] MySQL query not working!

2010-03-31 Thread tedd
At 4:20 PM +0430 3/31/10, Parham Doustdar wrote: Hi there, Here is a snippet of code... that doesn't work for some reason. Please note that I have put some @mysql_query($query) or die(mysql_error()); statements, to see if MySQL gives an error. I receive nothing other than the file starting to d

Re: [PHP] MySQL query not working!

2010-03-31 Thread Andrew Ballard
On Wed, Mar 31, 2010 at 9:08 AM, Andrew Ballard wrote: > Nope. All it does is suppress the error message. Just try it: > > > @mysql_connect('localhost', 'baduser', 'badpassword') or die('Could > not connect'); > > ?> > > Output: > Could not connect > > @mysql_connect('localhost', 'baduser', 'bad

Re: [PHP] MySQL query not working!

2010-03-31 Thread Midhun Girish
should have put: > >> > >> if (mysql_num_rows($result)) > >> > >> rather than just > >> > >> if ($result) > >> > >> Thanks! > >> - Original Message - > >> From: "Andre Polykanine" >

Re: [PHP] MySQL query not working!

2010-03-31 Thread Andrew Ballard
t;> >> if (mysql_num_rows($result)) >> >> rather than just >> >> if ($result) >> >> Thanks! >> ----- Original Message - >> From: "Andre Polykanine" >> To: "Parham Doustdar" >> Cc: >> Sent: Wednesday,

Re: [PHP] MySQL query not working!

2010-03-31 Thread Midhun Girish
gt; > - Original Message - > > From: "Andre Polykanine" > > To: "Parham Doustdar" > > Cc: > > Sent: Wednesday, March 31, 2010 4:41 PM > > Subject: Re: [PHP] MySQL query not working! > > > > > > > Hell

Re: [PHP] MySQL query not working!

2010-03-31 Thread Ashley Sheridan
gt; Thanks! > - Original Message - > From: "Andre Polykanine" > To: "Parham Doustdar" > Cc: > Sent: Wednesday, March 31, 2010 4:41 PM > Subject: Re: [PHP] MySQL query not working! > > > > Hello Parham, > > > > Adding to Ash&#x

Re: [PHP] MySQL query not working!

2010-03-31 Thread Alexey Bovanenko
Hi! To view error: you must use mysql_query(). @ before mysql - error supression. next you can use the following: $result=.. if($result){ if(mysql_num_rows($result)){ /* you have record in table */ }else{ /* you haven't */ On Wed, Mar 31, 2010 at 4:11 PM, Andre Polykanine wrote: > Hel

Re: [PHP] MySQL query not working!

2010-03-31 Thread Parham Doustdar
tween the apostrophes is given. And, I found out what the problem was; I should have put: if (mysql_num_rows($result)) rather than just if ($result) Thanks! - Original Message - From: "Andre Polykanine" To: "Parham Doustdar" Cc: Sent: Wednesday, March 31, 2010

Re: [PHP] MySQL query not working!

2010-03-31 Thread Andre Polykanine
Hello Parham, Adding to Ash's question, why to use the @ operator before mysql_query? -- With best regards from Ukraine, Andre Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original

Re: [PHP] MySQL query not working!

2010-03-31 Thread Ashley Sheridan
On Wed, 2010-03-31 at 16:20 +0430, Parham Doustdar wrote: > Hi there, > Here is a snippet of code... that doesn't work for some reason. Please note > that I have put some > > @mysql_query($query) or die(mysql_error()); > > statements, to see if MySQL gives an error. I receive nothing other than

Re: [PHP] MySQL Query not working?

2001-05-15 Thread Julian Wood
You might also want to remove the comma after "url = '$url'" and try an echo mysql_error($link) to see what the problem is. Julian on 5/14/01 5:46 PM, Peter Houchin - SunRentals Australia at [EMAIL PROTECTED] wrote: > change it to > > $sql = "UPDATE CLASS_ADS > SET client_id = '$client_id',

RE: [PHP] MySQL Query not working?

2001-05-14 Thread Peter Houchin - SunRentals Australia
change it to $sql = "UPDATE CLASS_ADS SET client_id = '$client_id', date = '$date', category = '$category', title = '$title', description = '$description', contact_name = '$contact_name, contact_number = '$contact_number', email = '$email', url = '$url', WHERE client_id = '$client_id' ";