Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3736 Search term is not being surrounded by single quotes

Latest_Git_snapshot
works-for-me
Marc Delisle
5
2013-06-11
2012-11-14
adrianbj
No

Doing a search on a table results in:

Error

SQL query: Documentation

SELECT *
FROM `cpg11d_users`
WHERE `user_id` = search_term
ORDER BY `cpg11d_users`.`user_lastvisit` DESC
LIMIT 0 , 30

MySQL said: Documentation
#1054 - Unknown column 'search_term' in 'where clause'

Discussion

  • adrianbj
    adrianbj
    2012-11-14

    • summary: Search terms is not being surrounded by single quotes --> Search term is not being surrounded by single quotes
     
  • Marc Delisle
    Marc Delisle
    2012-11-14

    • assigned_to: nobody --> lem9
    • status: open --> pending-works-for-me
     
  • Marc Delisle
    Marc Delisle
    2012-11-14

    Cannot reproduce this bug with master branch at commit e4fb9d2a511d41b6ec3f1022517b74bebf47dd93.

    What is the step-by-step scenario to produce this query?

    Please attach a small export of your table's structure and give version details for
    PHP
    MySQL server
    MySQL client library
    PHP extension

     
  • Marc Delisle
    Marc Delisle
    2013-01-18

    • status: pending-works-for-me --> closed-works-for-me
     
  • Michal Čihař
    Michal Čihař
    2013-06-11

    • Status: closed-works-for-me --> works-for-me