English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

this is the code:

include 'connect.php';
SELECT * FROM table WHERE MATCH(field)
AGAINST('search terms' IN BOOLEAN MODE)
echo 'search complete';
?>
I've tried running it a fuew times but it never works.

2006-12-17 03:25:25 · 5 answers · asked by curtis_3862552 2 in Computers & Internet Programming & Design

5 answers

You don't put the sql statement directly into your code; even if it were valid, it wouldn't do anything. You need to do something like this:

$query = "SELECT * FROM table WHERE MATCH(field)
AGAINST('search terms' IN BOOLEAN MODE)";
$result = mysql_query($query);

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "Field1 :{$row['field1']}
" .
"Field2 : {$row['field2']}

"
}

2006-12-17 03:42:20 · answer #1 · answered by manuelriliz 3 · 0 0

You can't just have the SQL sitting there. You need to find the commands for connecting to and querying whatever database you're using (they're different for different databases) or use the Pear DB package which works will all sorts of popular databases.

2006-12-17 03:36:40 · answer #2 · answered by watsonc64 3 · 0 0

PHP has many function for mySQL or many other database access. You have to use those function in proper way.

If you are using mySQL database (I am not sure what database server are you going to use), the following link might be helpful to you
http://www.php-mysql-tutorial.com/

2006-12-17 21:49:27 · answer #3 · answered by Riyadh Hossain 2 · 0 0

Is this page suppose to have a left sidebar? if it does then removing the align attribute of your table should fix it.

2016-05-23 02:00:28 · answer #4 · answered by Anonymous · 0 0

if you went to a site that a guy on here calling himself "man,woman, oroalgir or answer-mo. you have a virus. If you went to one of his site, click on the flag and report him.

2006-12-17 03:28:33 · answer #5 · answered by ruth4526 7 · 0 0

fedest.com, questions and answers