Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Fellow monks,
I am totally stumped on this one. When I try to use bind_param in the following code, I get a syntax error. They syntax error I get is: DBD::mysql::st execute failed: 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 ''user_info'' at line 1.... Now, if I change $qry = qq{SELECT * FROM ?} to $qry = "SELECT * FROM user_info"; and remove the bind_param statement, everything works fine. I even tried changing the bind_param statement from $sth->bind_param( 1, $table ); to $sth->bind_param( 1, "user_info" ); and I get the same syntax error as above. The query is valid. It works when bind_param is not used and fails only when bind_param is used. What am I overlooking? as always, your input is greatly appreciated davidj In reply to syntax error when using bind_param by davidj
|
|