View Single Post
 
Old February 6th, 2006, 07:33 AM
ghari ghari is offline
Authorized User
 
Join Date: Oct 2004
Location: Bangalore, Karnataka, India.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default php and mysql query

Hai

     In my application I am using one query like this

$qry_count ="SELECT COUNT(*) FROM tbl_mail LEFT JOIN tbl_country ON tbl_mail.country_id = tbl_country.country_id WHERE tbl_mail.deleted_status <> 'Y' AND tbl_mail.first_name LIKE '%x%'";

     This query work fine in my php application and mysqladmin.

     But if I tried using

$qry_count ="SELECT COUNT(*) FROM tbl_mail LEFT JOIN tbl_country ON tbl_mail.country_id = tbl_country.country_id WHERE tbl_mail.deleted_status <> 'Y' AND tbl_mail.first_name LIKE '%xxxxxx%'";

      Here I am getting following error in php but it work fine in Mysqladmin.

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 '-10,10' at line 1.


Any body have idea on this

Thanks!:)