|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error #1064
What could be wrong with the following query?
SELECT `album` FROM `photos` WHERE `album` IN ( SELECT `name` FROM `albums` ) I get the following error: #1064 - You have an error in your SQL syntax near 'SELECT `name` FROM `albums` ) LIMIT 0, 30 ' at line 1 Couldn't find an answer anywhere else... ![]() |
|
#2
|
|||
|
|||
|
What's your MySQL version?
__________________
"A pawn is the most important piece on the chessboard -- to a pawn" |
|
#3
|
|||
|
|||
|
Quote:
3.23.58 |
|
#4
|
|||
|
|||
|
That's your problem. MySQL doesn't support subqueries until 4.1.
|
|
#5
|
|||
|
|||
|
Quote:
bugger. so should i now use 2 queries to obtain the result I would like or is there an other way to get this done? |
|
#6
|
|||
|
|||
|
You can probably use a join, but I'm not entirely sure what you're trying to accomplish. Do you have albums in photos that don't also exist in albums?
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Error #1064 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|