我希望运行一个
mysql_query,如果某个字段以数字结尾,我可以选择一行.例如:
<?PHP $query = MysqL_query("SELECT id FROM table WHERE [ID ENDS IN 0]"); $query = MysqL_query("SELECT id FROM table WHERE [ID ENDS IN 1]"); $query = MysqL_query("SELECT id FROM table WHERE [ID ENDS IN 2]"); $query = MysqL_query("SELECT id FROM table WHERE [ID ENDS IN 3]"); //and so on... ?>
有没有办法做到这一点?任何帮助都会很棒.谢谢!
SELECT ... WHERE somefield LIKE '%1'