MySQL数据库存储名为“ Be Be or Not Be?”的文章。
该查询应该如何查找不带问号的名称条目?
例如简单的PHP代码:
$article= "Be or not Be";
$sth = $dbh->prepare('SELECT * FROM articles WHERE article_name=?');
$$sth->bind Param(1, $article, PDO:: PARAM_STR);
$sth->execute();
$row = $sth->fetch();
no matches...
更新以下行:-
$sth = $dbh->prepare('SELECT * FROM articles WHERE article_name=?');
带
$sth = $dbh->prepare('SELECT * FROM articles WHERE article_name LIKE ?');