how to ensure comparison is case sensitive?

Posted by newguy on Stack Overflow See other posts from Stack Overflow or by newguy
Published on 2010-06-09T19:16:00Z Indexed on 2010/06/09 19:22 UTC
Read the original article Hit count: 193

Filed under:
|

Hi there, im trying to do a comparison in MYSQL but wish for it to be case sensitive

ex:

$userID="test"
$q = db_query("select * from users where user_id = '" .  $userID  . "'");

In DB:

userid = "TEST"

Ho do i go about making sure the mysql query does not return TRUE for this query as the userid varialbe doesnt match the case of the userid in the database

thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql