开发者

How to query using mysqli prepared statements where 2 columns equal different values?

I am trying to query a database basically so it looks like this:

$stmt5 = $DBH->prepare("SELECT id FROM numbers WHERE value1 = ? value2 = ?");
$stmt5->bind_param("ss",$value1,$value2);

But i keep receiving "Call to a member function bind_param 开发者_JS百科on non-object" how can i do this?


You are missing an AND try this

$DBH->prepare("SELECT id FROM numbers WHERE value1 = ? AND value2 = ?")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜