fazzfarrell Posted June 30, 2008 Share Posted June 30, 2008 I done this so many times before! but can not rememebr! I have a data base which had lots of names in it, I only want to pull in one version of the name into the page, any one help! Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 mysql_query("SELECT name FROM table WHERE version = 'version'"); maybe a more informative topic heading that relates to your question will help you. Regards ACE Quote Link to comment Share on other sites More sharing options...
fazzfarrell Posted June 30, 2008 Author Share Posted June 30, 2008 Thanks, not expained myself properly I have a database with rob rob rob pete pete lin I want rob pete lin to appear on the page Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted June 30, 2008 Share Posted June 30, 2008 You want <?php $q = "select distinct `name` from tablename"; $rs = mysql_query($q) or die("Problem with the query: $q<br>" . mysql_error()); while ($rw = mysql_fetch_assoc($rs)) echo $rw['name'] . "<br>\n"; ?> Ken Quote Link to comment Share on other sites More sharing options...
Juan Dela Cruz Posted June 30, 2008 Share Posted June 30, 2008 Thanks, not expained myself properly I have a database with rob rob rob pete pete lin I want rob pete lin to appear on the page i guess ken got it right! but in addition to that i don't think its database that you're talking this is only table structure or perhaps fields of a table regards -juan- Quote Link to comment Share on other sites More sharing options...
fazzfarrell Posted June 30, 2008 Author Share Posted June 30, 2008 distinct thats it, think I may go blonde if I had any hair! thanks 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.