rastaman46 Posted March 29, 2012 Share Posted March 29, 2012 hello again need some advice cant get it working SELECT * FROM `tsue_members` WHERE memberid=0 if ($row['memberid'] == '0') { $img = "1.gif"; } echo $img; Quote Link to comment Share on other sites More sharing options...
abrahamgarcia27 Posted March 29, 2012 Share Posted March 29, 2012 well one suggestion your if statement is pretty much useless because all your member id's have to have 0 right? What is is that you want to do? i dont understand it from your script? Quote Link to comment Share on other sites More sharing options...
rastaman46 Posted March 29, 2012 Author Share Posted March 29, 2012 that was just example im need take user posts say user posted 500 post i need to put image next to hes nick name somthing like here my sql query go in this lane if ($row['user_posted'] == 500) { $bestposter = 'here i need add image' } Quote Link to comment Share on other sites More sharing options...
rastaman46 Posted March 29, 2012 Author Share Posted March 29, 2012 Did any other options to do this ? Quote Link to comment Share on other sites More sharing options...
abrahamgarcia27 Posted March 29, 2012 Share Posted March 29, 2012 well i think this has to do alot with your database structure this is the code i think might work <?php $img1 = 1.jpg; $img2 = 2.jpg; //query a count of user_posted if($row['COUNT(user_posted)'] >= 100){ echo $img1; }else { echo $img2; } ?> Quote Link to comment 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.