PROTECTED]
Sent: Saturday, November 13, 2004 1:16 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Help: Database Search
I've changed my logic around but still running into a
sql query error.
I've tried a number of things with no success. Here
is the error that returns on POST:
SELECT
I've changed my logic around but still running into a
sql query error.
I've tried a number of things with no success. Here
is the error that returns on POST:
SELECT PostStart, JobTitle, Industry, LocationState,
VendorID FROM VendorJobs WHERE (VendorJobs.Industry =
''1','2','3''Query failed: You
--- Stuart Felenstein [EMAIL PROTECTED] wrote:
Okay, so what did I learn.
1) That a comma delimited list (from the array) to be
used correctly in the sql statement had to use the IN
word.
$sql .= WHERE VendorJobs.Industry IN ($s_Ind);
2) I need a space between the first quotation in the
I am creating a database search form and results.
Running into a problem though.
I have two form elements, both that are fed by tables
that have int values (1, 2 , etc)
my sql statement is such:
SELECT vendorjobs.PostStart, vendorjobs.JobTitle,
vendorjobs.Industry, vendorjobs.VendorID,
You might want to try looking up the syntax for left join queries.
I think this might be what you are after.
http://dev.mysql.com/doc/mysql/en/JOIN.html
On Wednesday 10 November 2004 14:37, Stuart Felenstein wrote:
I am creating a database search form and results.
Running into a problem
--- Jon Hill [EMAIL PROTECTED] wrote:
You might want to try looking up the syntax for left
join queries.
I think this might be what you are after.
http://dev.mysql.com/doc/mysql/en/JOIN.html
It has nothing to do with left joins. It works fine
provided I do one of two things, make
On Wednesday 10 November 2004 14:37, Stuart Felenstein wrote:
But if the user decides to only use one of the
elements, then I don't want the query to return
nothing because of the And in the where clause so I
have these 2 statements that set a default value
(shown here as 0 in the event one
On Wednesday 10 November 2004 15:37, Stuart Felenstein wrote:
--- Jason Wong [EMAIL PROTECTED] wrote:
Why not build your sql query according to whether or
not whatever you want is
selected or not. That way debugging is easier as
you won't be looking at
queries that contain redundant
] Help: Database Search
I am creating a database search form and results.
Running into a problem though.
I have two form elements, both that are fed by tables
that have int values (1, 2 , etc)
my sql statement is such:
SELECT vendorjobs.PostStart, vendorjobs.JobTitle
--- Jason Wong [EMAIL PROTECTED] wrote:
Why not build your sql query according to whether or
not whatever you want is
selected or not. That way debugging is easier as
you won't be looking at
queries that contain redundant ... AND 0
Jason, How would I do that ? Care to share a
I have created a database search and results set.
Things seem to work fine until I add the join
statements into the results page query string.
If I don't use the joins , the search works great. It
returns the correct results based on the criteria
input. If I add the joins in, then basically all
Wow~! I'm getting good.
--- Stuart Felenstein [EMAIL PROTECTED] wrote:
I have created a database search and results set.
Things seem to work fine until I add the join
statements into the results page query string.
If I don't use the joins , the search works great.
It
returns the correct
Ooops, not solved yet.
--- Stuart Felenstein [EMAIL PROTECTED] wrote:
I have created a database search and results set.
Things seem to work fine until I add the join
statements into the results page query string.
If I don't use the joins , the search works great. It
returns the correct results
13 matches
Mail list logo