User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 403,490 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,272 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 3255 | Replies: 7
Reply
Join Date: Dec 2005
Posts: 7
Reputation: bennieblanco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bennieblanco bennieblanco is offline Offline
Newbie Poster

Mysql Search results

  #1  
Dec 1st, 2005
Hi there ,I am working on my web site and
I need some help with my search result query's
If you look here

http://www.sensitivetechnology.com/search.php
and in the top search field enter 74AC86SC the resilt will show Product ID and Description ,but it won't show quantity and price
And also I need a query that once you have enterd first 2 leters or numbers of the part it will list all parts containing the first 2 numbers/letters
I am stuck in the midlle and I also want to make hyperlink the results to my request page
http://www.sensitivetechnology.com/rfq.php
so once u click on the result it would add the same one to the
"Your rfq" field in the rfq.php page

I atached the needed files and my querys are in the search.class file

Thank you
Attached Files
File Type: zip search.zip (9.9 KB, 9 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Oklahoma
Posts: 902
Reputation: chrisbliss18 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 21
chrisbliss18's Avatar
chrisbliss18 chrisbliss18 is offline Offline
Posting Shark

Re: Mysql Search results

  #2  
Dec 1st, 2005
Step 1 - Return all the fields for the product:
Change this query:
"SELECT product_id, product_description FROM product WHERE product_id = '" . $product . "'"
to
"SELECT * FROM product WHERE product_id = '" . $product . "'"

Step 2 - Return partial match queries:
Update the query:
"SELECT * FROM product WHERE product_id LIKE '" . $product . "%'"
This query returns all products that match or begin with the search text.

Step 3 - Add RFQs to the rfq.php page:
Are you wanting to be able to add multiple RFQs or just fill in one single RFQ? In other words, do you intend for the person to be able to click on multiple links and have all of the selected products show up in the text area or just to give them the ability to click a link and have that single product show up in the text area?
Did we help you? Did we miss the point entirely? Update your thread and let us know.
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
Reply With Quote  
Join Date: Dec 2005
Posts: 7
Reputation: bennieblanco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bennieblanco bennieblanco is offline Offline
Newbie Poster

Re: Mysql Search results

  #3  
Dec 1st, 2005
just to give them the ability to click a link and have that single product show up
I updated the search.zip it contains the rfq.php file also

THANK YOU FOR FAST REPLY!
why is it not showing other 2 fields?
Reply With Quote  
Join Date: Dec 2005
Posts: 7
Reputation: bennieblanco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bennieblanco bennieblanco is offline Offline
Newbie Poster

Re: Mysql Search results

  #4  
Dec 1st, 2005
Works Like A Charm!!! Awesome
Reply With Quote  
Join Date: Dec 2005
Posts: 7
Reputation: bennieblanco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bennieblanco bennieblanco is offline Offline
Newbie Poster

Re: Mysql Search results

  #5  
Dec 1st, 2005
hmm it is case sensitive for some reason? it must be small letters and if you add space after the part# it wont show anything
Reply With Quote  
Join Date: Aug 2005
Location: Oklahoma
Posts: 902
Reputation: chrisbliss18 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 21
chrisbliss18's Avatar
chrisbliss18 chrisbliss18 is offline Offline
Posting Shark

Re: Mysql Search results

  #6  
Dec 1st, 2005
Can you be more specific?

What is case sensitive?
Where are you putting a space? Show me the code and the output.
Did we help you? Did we miss the point entirely? Update your thread and let us know.
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
Reply With Quote  
Join Date: Dec 2005
Posts: 7
Reputation: bennieblanco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bennieblanco bennieblanco is offline Offline
Newbie Poster

Re: Mysql Search results

  #7  
Dec 1st, 2005
Originally Posted by chrisbliss18
Can you be more specific?

What is case sensitive?
Where are you putting a space? Show me the code and the output.

OK ,when I put the part # in search field example
XC2V6000-4BF957C it is not going to find it since the part is in caps
if I enter : xc2v6000-4bf957c it is going to find it
if I enter space after part# it is not going to find it
if I take the dash away from part# it is not going to find it
Reply With Quote  
Join Date: Dec 2005
Posts: 7
Reputation: bennieblanco is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bennieblanco bennieblanco is offline Offline
Newbie Poster

Re: Mysql Search results

  #8  
Dec 1st, 2005
And regarding the hyperlink you can see what I need here

http://vital-ic.com/index.php?page=part&
just enter xc2v in part search field
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 12:13 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC