jakebur01 Posted February 19, 2008 Share Posted February 19, 2008 I can't get this right. $result=mysqli_query($db, "SELECT Breed_id, Breed from dog_breed where `Breed_id` >= '0' and where `Breed_id` <= '93' order by Breed_id asc ");//. Link to comment https://forums.phpfreaks.com/topic/91838-mysqli_fetch_array-expects-parameter-1-to-be-mysqli_result/ Share on other sites More sharing options...
The Little Guy Posted February 19, 2008 Share Posted February 19, 2008 try and remove the second where statement. Link to comment https://forums.phpfreaks.com/topic/91838-mysqli_fetch_array-expects-parameter-1-to-be-mysqli_result/#findComment-470342 Share on other sites More sharing options...
jakebur01 Posted February 19, 2008 Author Share Posted February 19, 2008 that worked but I really need to be able to select a range of specific rows. Is their another way to code it? Link to comment https://forums.phpfreaks.com/topic/91838-mysqli_fetch_array-expects-parameter-1-to-be-mysqli_result/#findComment-470347 Share on other sites More sharing options...
akitchin Posted February 19, 2008 Share Posted February 19, 2008 the issue is your syntax. when specifying multiple where clauses, you don't repeat the "where:" $result=mysqli_query($db, "SELECT Breed_id, Breed from dog_breed where `Breed_id` >= '0' and `Breed_id` <= '93' order by Breed_id asc ");// also have a look through the MySQL manual for the BETWEEN operator: $result=mysqli_query($db, "SELECT Breed_id, Breed from dog_breed where `Breed_id` BETWEEN '0' AND '93' order by Breed_id asc ");//. Link to comment https://forums.phpfreaks.com/topic/91838-mysqli_fetch_array-expects-parameter-1-to-be-mysqli_result/#findComment-470393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.