MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:January 27 2010 10:00am
Subject:Re: Need an extra pair of eyes
View as plain text  

The use of && is a "logical and", the normal SQL keyword
would be AND.

As in:

WHERE `productid` = 173846 AND `variantid` = 73130
AND `type` = 's'

With regards,

Martijn Tonies
Upscene Productions

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:

I have a query that is giving me fits, but I can't find where there
error is.  I know its one of those things that I'll slap myself in the
forehead for not seeing, but after a half an hour, it's all a blur.  ;)
If someone can spot it, I'd be most grateful.

REPLACE INTO product_dimensions SET `productid` = '173846', `variantid`
= '73130', `type` = 's', `height` = '3.7500', `width` = '3.5000',
`depth` = '5.3300' WHERE `productid` = 173846 && `variantid` = 73130 &&
`type` = 's'

I've also tried it this way....

REPLACE INTO product_dimensions ( `productid`, `variantid`, `type`,
`height`, `width`, `depth` ) VALUES ( '173846', '73130', 's', '3.7500',
'3.5000', '5.3300' ) WHERE `productid` = 173846 && `variantid` = 73130
&& `type` = 's'

And the error for both is the same:

You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near 'WHERE
`productid` = 173846 && `variantid` = 73130 && `type` = 's'' at line 1

John C. Nichel IV
System Administrator
716.362.9212 x16

MySQL General Mailing List
For list archives:
To unsubscribe:

Need an extra pair of eyesJohn Nichel26 Jan
  • RE: Need an extra pair of eyesJohn Nichel26 Jan
  • Re: Need an extra pair of eyesMartijn Tonies27 Jan