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 Quote Link to comment 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"; Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted May 1, 2008 Author Share Posted May 1, 2008 thanx... that solve it 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.