mysql - php 's mysql_query function didn't support more LIKE statament? -


I inquired:

  choose from marriage * where YMD_X '2010-1- % 'And married.' AA% 'and do not like to get married.' BB% 'is not liked;  

But after using the mysql_fetch_object function, I could not find the exact result, the result as I would ask:

  select * from the wedding where '2010-1-%' like YMD_X;  

Why?


Find some code pieces:

$ res1 = $ db-> Find ("Choose Marriage from Marriage * where YMD_X like". "". $ CnDate. " % 'And not' 冲 '. $ Male_shu. "%';");

Find public functions ($ sql, $ key = null) {$ data = array (); $ Result = $ this-> query ($ sql); {$ Data [$ line -> {$ key}] = $ line;} and {$ data [] = $ line;} ($ line = mysql_fetch_object ($ result)) {if ((empty ($ key)) } $ Returns data;}

  public function query ($ sql) {$ stime = microtime (true); $ result = mysql_query ($ sql, $ this-> conn); $ This-> query_count ++; if ($ result === false) {new exception throw (mysql_error ($ this-> conn). "In SQL: $ sql");} $ Etime = microtime ( True); $ Time = number_format (($ etime - $ time) * 1000, 2); $ this-> query_list [] = $ time ". $ Sql; return result of return;}  

why PHP's mysql_query function just saves things to MySQL as you wrote, do you make sure give a different result directly from running MySQL on a single query?

Here the problem is almost certainly in your query.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -