Jump to content

FULLEXT search


witt

Recommended Posts

Is there any reason why this script wouldn't work?

<?php

require_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 />';

}

?>
Link to comment
Share on other sites

[!--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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.