RE: [PHP-DB] localhost versus remote

2002-10-27 Thread John W. Holmes
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

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
sorry for my furry message before. I search a DB in multiple search fields and my result code looks like this: ?PHP $db=test; $table=airline_a; if (! $link) die( couldn't connect); mysql_select_db($db) or die (won't open test:.mysql_error() ); $db_res=mysql_list_dbs($link);

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Peter Beckman
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().brSQL: $query); So when your query dies, you'll know why. Peter On Sun, 27 Oct 2002, Seabird wrote: sorry

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
$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

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
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

RE: [PHP-DB] localhost versus remote

2002-10-27 Thread John W. Holmes
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 LIKE

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Peter Beckman
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

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
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!

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
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: form method=GET action=aviation/result.php

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Peter Beckman
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 passed

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Peter Beckman
First off, use quotes. If you are going to be a good coder, always use quotes in your HTML and your PHP. form method=GET action=aviation/result.php target=frameData In PHP: $table=aviation_a; // NOT $table=aviation_a; Sure, they both work, but they can cause problems in the future, and it