Mysql error empty query

Mysql won' t tell you what was the error unless asked explicitly. So, you have to always check the result of every mysql function interacting with server and if result is FALSE - check. What do you try to achieve with this line? $ result = mysql_ query( $ query) ;. Just delete it and change the line above to $ result = mysql_ query( ' insert into cart values( '. $ st way to manage this is: $ in = implode( " ', ' ", $ ids) ; / / generate like 1', ' 2 $ query = " SELECT * FROM user where user_ id IN ( ' $ in' ) " ; / / if has 1', ' 2 surrond it with quote make it IN( ' 1', ' 2' ) and if empty than IN( ' ' ). Error: 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 ' 1' at line 1. Question: What makes the mysql_ query empty? It' s you, who calls mysql_ query without a real query:. What we see in your code is that you pass $ sql to mysql_ query which isn' t a valid query and you can check it with var_ dump( $ sql) ;. xml version= " 1. 0" encoding= " UTF- 8"?

  • Excel runtime error 1004 office 365
  • Windows xp hard error blue screen
  • Error b200 en canon mx391
  • Error runtime 50003
  • Error 920 actualizar google play
  • My youtube always error occurred


  • Video:Error query mysql

    Mysql error empty