sdaniels Posted April 12, 2006 Share Posted April 12, 2006 I dont know why im having this issue but anyhowwill someone wite an example of how to select some data from a table and echo it out. im allready connected to the databasei'v allready set up the query $query = "SELECT whatever FROM wehrever WHERE something = 'yadda' AND something else = 'yadda";@mysql_query($query);now i want to echo out just one cell from the table... what needs to be done? Link to comment https://forums.phpfreaks.com/topic/7169-echo-out-a-value-from-a-table/ Share on other sites More sharing options...
bonaparte Posted April 12, 2006 Share Posted April 12, 2006 $result = mysql_query($query) ;$line = mysql_fetch_array($result, MYSQL_ASSOC);echo $line['whatever']; Link to comment https://forums.phpfreaks.com/topic/7169-echo-out-a-value-from-a-table/#findComment-26094 Share on other sites More sharing options...
BladeMetal Posted April 12, 2006 Share Posted April 12, 2006 where 'whatever' equals the field name in your database Link to comment https://forums.phpfreaks.com/topic/7169-echo-out-a-value-from-a-table/#findComment-26118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.