dharm Posted September 26, 2006 Share Posted September 26, 2006 Hi, im trying to find a way where I can get the highest profile_id number from a group of profiles owned by a particular user..The table “profiles” also contains other users profile(s). here is the part of the code im workin with:[quote] <?php $query = "Select MAX(profile_no) from ".$DBprefix."profiles GROUP BY where pro_id='$cid'"; // $cid is the users unique account number. ?> [/quote]any help will be much appreciated .. thx! Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 26, 2006 Share Posted September 26, 2006 <?php $query = "Select profile_no from ".$DBprefix."profiles where pro_id='$cid' ORDER BY profile_no DESC LIMIT 0,1"; // $cid is the users unique account number. ?> Does that work???? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 26, 2006 Share Posted September 26, 2006 And what are you getting now? Quote Link to comment Share on other sites More sharing options...
dharm Posted September 26, 2006 Author Share Posted September 26, 2006 Spot on mate!! thank you!! 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.