显示MySQL中的所有记录

时间:2012-12-18 19:44:54

标签: mysql perl filter

我正在尝试显示MySQL表中的所有记录。

我可以做select * from table但这不是我想做的事。

我想做这样的事情

select app_id, app_name from app where app_sendto = '%'

我已尝试过上述内容,但没有显示任何内容。

我想按以下方式运行上述查询

$get_app = "select app_id, app_name from app where app_sendto = ?";
$sth = $dbh->prepare($get_app); 
$sth->execute('people') or die "Cannot execute sth: $DBI::errstr";

任何人都可以帮助我。

1 个答案:

答案 0 :(得分:-2)

刚刚得到解决方案,查询应该是

select app_id, app_name from app where app_sendto like '%'
相关问题