sorry for my "furry" message before.

I search a DB in multiple search fields and my result code looks like this:


if (! $link)
 die( "couldn't connect");
 or die ("won't open test:".mysql_error() );

for($x=0; $x<$num; $x++)

for($x=0; $x<$num; $x++)

$count = mysql_query("SELECT * FROM $table");//selects all rows
$total = mysql_num_rows ($count);//counts the selected rows

$query = "SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
    Field2 LIKE '%$name%' $ton
    Field3 LIKE '%$country%'
    ORDER BY $sort";
$result = mysql_query($query) or die("Error in
query");//////////////////////////so this is the error I
$total = mysql_num_rows ($result);//counts the selected rows
print "<span class=text>your search returned ".$total." matches</span>";

print "<table border=1>\n";
print "<tr><td class=grey>Icao</td><td class=grey>Name (Location)</td><td
while($row = mysql_fetch_assoc($result)){
 print "<tr>\n"
          ."<td class=white>" . $row['Field1'] . "</td>\n"
   ."<td class=white>" . $row['Field2'] . "</td>\n"
   ."<td class=white>" . $row['Field3'] . "&nbsp</td>\n"

print "</tr></table>";

The problem I have is that my setup on my localhost and my remote are
identical (I think) and the files are the same. So where does it go wrong.
All I get as error is 'Error in query' which doesn't tell me much. Please
help me...


Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching????
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
> > Hi everyone,
> > I'm using a MySQL DB and a search form. Eveery thing works fine, but
> when
> > I
> > upload, it has a Error in query. I checked all the little details but
> > can't
> > find out why? Any ideas are welcome.
> >
> > Jacco
> This one is an easy problem to fix. All you have to do is find the error
> and correct what's causing the problem.
> Hope that helps.
> ---John Holmes...
> PS: If you found my answer worthless, it was about as helpful as your
> question. What error? What versions of PHP and MySQL? What's your
> code???

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to