b1011 Posted May 21, 2007 Share Posted May 21, 2007 How to you find a value at a certain spot in an array? i need to find a value in gangid in table gang where gangname = 0. how do i make mysql (also using php) return the vallue at that section? Link to comment https://forums.phpfreaks.com/topic/52294-returning-a-value/ Share on other sites More sharing options...
bubblegum.anarchy Posted May 21, 2007 Share Posted May 21, 2007 <?php $result = mysql_query($query = "SELECT gangid FROM gang WHERE gangname = 0") or trigger_error(mysql_error()."<PRE>".$query."</PRE>", E_USER_ERROR); list($gangid) = mysql_fetch_row($result); print "The gangid: ".$gangid; ?> Link to comment https://forums.phpfreaks.com/topic/52294-returning-a-value/#findComment-258052 Share on other sites More sharing options...
fenway Posted May 23, 2007 Share Posted May 23, 2007 FIND_IN_SET() can also work sometimes. Link to comment https://forums.phpfreaks.com/topic/52294-returning-a-value/#findComment-260106 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.