2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by heenix
0

Hey,

You've posted a huge code segment but not explained what it does or why it does it? Your description is rather vauge and I, for one, don't really want to dig through all that code looking for a problem I don't know about.

Chris

0

Hey,

You've posted a huge code segment but not explained what it does or why it does it? Your description is rather vauge and I, for one, don't really want to dig through all that code looking for a problem I don't know about.

Chris

Thanks so much for Mr. Heenix for commenting my post.

My problem is that I can search only both values like All=location and All category is fine

But I if select Location=Phnom Penh and Category= Computer is not show me the right criteria.

Thank so much in advance for your million help.


Kindly regards,

Bunhok

0

Hey,

I've spotted a slight problem near the beginning of your script. The section where you loop to show the job categories writes the category ID and the category name into an option field. You have a default field named "All Categories" with the value of 0. However, in MySQL, I believe it may be possible to get an index of 0.. this would produce html like this:

<option value="0">All Categories</option>
<option value="0">Category A</option>
<option value="1">Category B</option>

I recommend you make the "All Categories" and "All Locations" values to -1, a number outside the range of what MySQL may return. This will stop any duplication problems. As I mentioned earlier, it's very difficult to read your code, so this next comment may be wildly off.

On line 33, you check to see if "All Categories" and "All Locations" has been selected and you have tailored an entire section querying the database for that, and in the corresponding else statement (Line 97), you've begun to show the HTML table code, but you've commented out everything else to do with the database from line 111 onwards?

I hope this helps,
Christopher Lord

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.