The problem is in your SQL query.
Try it as:
$sql = "SELECT * FROM links WHERE (SUBJECT1='$subject' OR SUBJECT2='$subject') AND
GEOGRAPHIC='$geographic' ORDER BY ORGANIZATION ASC";
The AND operator has higher precendence than the OR, so given that you didn't have
parenthesis, it was interpret
I'm working on a query by selection type of form, where if a user
selects a subject to get information. Each database entry will have 2
subject fields, Subject 1 being the main subject and Subject 2 being the
cross-subject. A table is set up like this:
+--+--+--+--+---
t: Friday, March 15, 2002 2:55 PM
To: 'Martin Towell'; [EMAIL PROTECTED]
Subject: RE: [PHP] Fetching 1 array from either one of 2 possible
columns?
I apologize if I wasn't clear in my email. The query part is fine I
think, as I tested it through the myPHPAdmin and had no problem w
Thursday, March 14, 2002 7:42 PM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Fetching 1 array from either one of 2
> possible columns?
>
>
> use brackets
>
> where (sub1 or sub2) and geo
>
> -Original Message-----
> From: phplis
use brackets
where (sub1 or sub2) and geo
-Original Message-
From: phplist [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 2:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Fetching 1 array from either one of 2 possible columns?
I'm working on a query by selection type of
I'm working on a query by selection type of form, where if a user
selects a subject to get information. Each database entry will have 2
subject fields, Subject 1 being the main subject and Subject 2 being the
cross-subject. A table is set up like this:
+--+--+--+--+---
6 matches
Mail list logo