Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2012
    Posts
    1

    Unanswered: Query runs on local but not on Server (single quote problem)

    The query
    PHP Code:
    SELECT FROM onlinepg as pgpg_rooms as rooms WHERE pg.pg_id=rooms.pg_id and pg.status=AND ( rooms.roomtype='Sharing Basis' ); The above query is written in PHP 
    is running on my local mysql server (version 5.1.41) but not on server (version 5.1.61); getting

    HTML Code:
    SQL query failed. Check your query.
    
    Error Returned: 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 '\'Sharing Basis\' )' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'Sharing Basis\' )' at line 1
    Last edited by abhi10kumar; 03-28-12 at 07:15.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •