Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird "Operand should contain 1 column(s)" error

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

I'm a bit baffled by this error I get:

Operand should contain 1 column(s)

..with the following query:

SQL:
SELECT *, ( 6371 * acos( cos( radians('43,7335') ) * cos( radians( latitude ) ) * cos( radians( longitude )
- radians('2,3985') ) + sin( radians('43,7335') ) * sin( radians( latitude ) ) ) ) AS distance
FROM hotels_PrioritySpots spot WHERE spot.latitude BETWEEN (43,7335-0.7) AND (43,7335+0.7) AND spot.longitude BETWEEN (2,3985-1.1) AND (2,3985+1.1) AND spot.link_id_fk != 2312 HAVING distance < 50 ORDER BY distance LIMIT 5

The same code works fine on another site... so why wouldn't it be working here? AFAIK the code is all fine.

TIA

Andy
 
Never mind - found it. Someone someone got a lat/lng value with commas into the system. We have new checks for that now, so they must have got in some time before that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top