DaviDJ Posted November 20, 2006 Share Posted November 20, 2006 Well it's a PHP/MySQL problem and so I thought it would be best in here. Well the thing is on phpMyAdmin I do a query and it returns the correct result... but when I do it in php the result is 0.[code] // Select all members$sql = "SELECT `id` FROM `".$GLOBALS['DB_PREFIX']."_members` WHERE `rank` NOT LIKE 'admin' AND `locked` = 'N';";$res = mysql_query($sql) or page_end('Error in sql.');unset($sql);$total_mem = mysql_num_rows($result);mysql_free_result($result);[/code]I tried != in replace of NOT LIKE but $total_mem still returned 0, whereas phpMyAdmin returns the correct number of results.I thank you to anyone who can help me on this, and any extra info you need just ask.Thanks, Rhinos Quote Link to comment https://forums.phpfreaks.com/topic/27889-mysqlphp-search-parameter-help/ Share on other sites More sharing options...
fenway Posted November 20, 2006 Share Posted November 20, 2006 But you're not getting an error? Quote Link to comment https://forums.phpfreaks.com/topic/27889-mysqlphp-search-parameter-help/#findComment-127618 Share on other sites More sharing options...
DaviDJ Posted November 22, 2006 Author Share Posted November 22, 2006 Thanks, but I have fixed the problem now... just took time to look it over. Quote Link to comment https://forums.phpfreaks.com/topic/27889-mysqlphp-search-parameter-help/#findComment-128287 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.