rubing Posted April 19, 2008 Share Posted April 19, 2008 I am trying to find an alternative mysqli command(s) for mysql_result() I need to return a specific cell from a specific row by calling its field name. Link to comment https://forums.phpfreaks.com/topic/101811-return-cell-in-mysqli/ Share on other sites More sharing options...
marcus Posted April 19, 2008 Share Posted April 19, 2008 $sql = "SELECT cow,cheese FROM `animals` WHERE `farm`='Hillshire'"; $res = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($res); echo "The cow, <b>".$row['cow']."</b> that made the cheese, <b>".$row['cheese']."</b> was from <b>Hillshire Farms</b>"; get it? (technically the statement above is false) Link to comment https://forums.phpfreaks.com/topic/101811-return-cell-in-mysqli/#findComment-520982 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.