alexguz79 Posted May 1, 2008 Share Posted May 1, 2008 hey everybody little help here pliz i have this DDBB where the table sports have seven fields, on of them is d_sports and have diferents infos: Baseball Basketball Hockey etc.. i want to select and display only the ones with Baseball info.... how can i do this?? i know is something like this: <?php require_once('config_noticia.php'); $sql = "SELECT Baseball FROM sports ORDER BY ID DESC LIMIT 0,1"; $query = mysql_query($sql); while ($row = mysql_fetch_array($query)){ echo $row['titulo']; } ?> thank people Link to comment https://forums.phpfreaks.com/topic/103728-solved-help-selecting-a-specific-value-on-a-database/ Share on other sites More sharing options...
conker87 Posted May 1, 2008 Share Posted May 1, 2008 $sql = "SELECT Baseball FROM sports WHERE d_sports = 'Baseball' ORDER BY ID DESC LIMIT 0,1"; Link to comment https://forums.phpfreaks.com/topic/103728-solved-help-selecting-a-specific-value-on-a-database/#findComment-531098 Share on other sites More sharing options...
alexguz79 Posted May 1, 2008 Author Share Posted May 1, 2008 thanx... that solve it Link to comment https://forums.phpfreaks.com/topic/103728-solved-help-selecting-a-specific-value-on-a-database/#findComment-531175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.