allanb7
11-08-2010, 11:44 AM
Hello everybody.
I have a little problem with a sql string comparison.
I tried to use the following code to compare two different rows by a variable to
get a result..
The code works fine if the variable is a number like: 12345
But if I use letters and numbers like: AZ1234 It doesn't work.
Code:
$database->setQuery( 'SELECT task_id FROM #_projects WHERE title = '.$jid );
What am I missing..??
Hope you can help me..
Best regards
Allan.
I have a little problem with a sql string comparison.
I tried to use the following code to compare two different rows by a variable to
get a result..
The code works fine if the variable is a number like: 12345
But if I use letters and numbers like: AZ1234 It doesn't work.
Code:
$database->setQuery( 'SELECT task_id FROM #_projects WHERE title = '.$jid );
What am I missing..??
Hope you can help me..
Best regards
Allan.