witt Posted June 11, 2006 Share Posted June 11, 2006 Is there any reason why this script wouldn't work?<?phprequire_once ('includes/mysql_connect.php');$query = "SELECT last_name FROM users WHERE MATCH (first_name) AGAINST('bob')";$result = mysql_query ($query);while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo $row[0];echo '<br />';}?> Quote Link to comment Share on other sites More sharing options...
zirgs Posted June 11, 2006 Share Posted June 11, 2006 change[code]echo $row[0];[/code]to this one[code]echo $row['0'];[/code]but i think that you cant echo non existing row? Quote Link to comment Share on other sites More sharing options...
witt Posted June 11, 2006 Author Share Posted June 11, 2006 [!--quoteo(post=382546:date=Jun 11 2006, 11:37 AM:name=zirgs)--][div class=\'quotetop\']QUOTE(zirgs @ Jun 11 2006, 11:37 AM) [snapback]382546[/snapback][/div][div class=\'quotemain\'][!--quotec--]change[code]echo $row[0];[/code]to this one[code]echo $row['0'];[/code]but i think that you cant echo non existing row?[/quote]It's MYSQL_NUM not MYSQL_ASSOC so [0] is correct. 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.