zed420 Posted November 26, 2008 Share Posted November 26, 2008 Hi All Can some please tell me what is wrong with this query it's bringing out the Duplicate results according to $pagesize . As it is now it's bringing out same result three times. Why??? I have inserted the query into phpMyAdmin its working fine bringing out one result. Some help will be greatly appreciated. Thanks $pagesize = 3; $recordstart1 = (isset($_GET['recordstart'])) ? $_GET['recordstart'] : 0; $query1 = "SELECT * FROM job_tb,user WHERE job_tb.status = 'No' OR job_tb.cust_address = 'Cancel' AND user_id = id ORDER BY job_id DESC LIMIT $recordstart, $pagesize"; $result1 = mysql_query($query1)or die(mysql_error()); Thank in advance Zed Quote Link to comment https://forums.phpfreaks.com/topic/134385-duplicate-results/ Share on other sites More sharing options...
Maq Posted November 26, 2008 Share Posted November 26, 2008 job_tb.user_id = user.id Quote Link to comment https://forums.phpfreaks.com/topic/134385-duplicate-results/#findComment-699616 Share on other sites More sharing options...
sasa Posted November 26, 2008 Share Posted November 26, 2008 and is evaluate before or try WHERE (job_tb.status = 'No' OR job_tb.cust_address = 'Cancel') AND user_id = id Quote Link to comment https://forums.phpfreaks.com/topic/134385-duplicate-results/#findComment-699620 Share on other sites More sharing options...
zed420 Posted November 26, 2008 Author Share Posted November 26, 2008 Thanks for quick reply It didn't work still the same, coming out with three results. Zed Quote Link to comment https://forums.phpfreaks.com/topic/134385-duplicate-results/#findComment-699623 Share on other sites More sharing options...
Maq Posted November 26, 2008 Share Posted November 26, 2008 Are there any other common fields between job_tb and user? Quote Link to comment https://forums.phpfreaks.com/topic/134385-duplicate-results/#findComment-699626 Share on other sites More sharing options...
zed420 Posted November 26, 2008 Author Share Posted November 26, 2008 sasa YOU ARE A MAGIC MAN it worked, thank you Zed Quote Link to comment https://forums.phpfreaks.com/topic/134385-duplicate-results/#findComment-699627 Share on other sites More sharing options...
zed420 Posted November 26, 2008 Author Share Posted November 26, 2008 Maq thank you blue, all sorted Many thanks Zed Quote Link to comment https://forums.phpfreaks.com/topic/134385-duplicate-results/#findComment-699629 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.