Hi Rafal,
binary is a reserved word, you need to quote it with back-ticks ` if
you want to use it:
SELECT s2u.valus as `binary`
FROM ...

/Johan

Rafal Kedziorski wrote:
Hi,

I get this:

"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 '(cast(from_unixtime(cast(s2u.value as binary) div 1000 ) as dat"

I think, the problem is here:

select
    s2u.value as binary
from
    users u,
    setting_2_user s2u
where
    s2u.setting_id = 150
and
    u.user_id = s2u.user_id;

"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 'binary from users u, setting_2_user s2u where s2u.setting_id ="



--
Johan Höök, Pythagoras Engineering Group
                - MailTo:[EMAIL PROTECTED]
                - http://www.pythagoras.se
Pythagoras AB, Stormbyv. 2-4, SE-163 55 SPÅNGA, Sweden
Phone: +46 8 760 00 10 Fax: +46 8 761 22 77


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to