First off, use quotes. If you are going to be a good coder, always use
quotes in your HTML and your PHP.
In PHP:
$table="aviation_a"; // NOT $table=aviation_a;
Sure, they both work, but they can cause problems in the future, and it is
considered BAD CODING. USE QUOTES. Fix all your input
Please stop responding to the list. Your problems are far to simple to
bother everyone on the list.
I have no idea what you mean when you say "locally" or "remote."
Basically your problem is that your script does not see any of the
variables. They are empty or not set. They are not getting pas
I also provide my searchform here. The problem I have is that everything
works when run on my localhost (which is my testing location before upload.
I have the exact same code local and remote.
My searchform should pass the code. here it comes:
Hi Peter I understand your frustration,
but how come that it works fine on my localhost, prosessing the exact same
code?? I thought it worked because it works fine locally
What is the differense in my code posted locally and remote?
Jacco
--
http://seabird.jmtech.ca
Attitude is Everything!
It seems to me you have no idea what you are doing. You really need to
learn how to troubleshoot your code, as this is a very simple problem to
fix. It's not your code. The variables you put in your SQL are empty.
Your code:
$query = "SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
F
> MySQL Error: You have an error in your SQL syntax near 'Field2 LIKE
'%%'
> Field3 LIKE '%%' ORDER BY ' at line 2
> SQL: SELECT * FROM airline_a WHERE Field1 LIKE '%%' Field2 LIKE '%%'
> Field3
> LIKE '%%' ORDER BY
You need some ANDs between each of your field LIKE '%%' clauses.
WHERE field1 LI
My error came out like this:
MySQL Error: You have an error in your SQL syntax near 'Field2 LIKE '%%'
Field3 LIKE '%%' ORDER BY ' at line 2
SQL: SELECT * FROM airline_a WHERE Field1 LIKE '%%' Field2 LIKE '%%' Field3
LIKE '%%' ORDER BY
Why does it not do this at my localhost?? I have the % around
$ton is my AND/OR field. I'll change my error code and post it, thanx,
Jacco
--
http://seabird.jmtech.ca
Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
"Peter Beckman" <[EMAIL PROTECTED]> wrote in message
news:20021027151406.T64513-10@;thermonucle
That's some nasty code
Two things:
1. What is $ton in your query?
2. Change your mysql_query row to this:
$result = mysql_query($query) or die("MySQL Error: ".mysql_error()."SQL:
$query");
So when your query dies, you'll know why.
Peter
On Sun, 27 Oct 2002, Seabird wrote:
> sorry
sorry for my "furry" message before.
I search a DB in multiple search fields and my result code looks like this:
your search returned ".$total." matches";
print "\n";
print "IcaoName (Location)Country";
while($row = mysql_fetch_assoc($result)){
print "\n"
."" . $row['Field1'] . "\n"
> 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
11 matches
Mail list logo