SunQuest
           MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 17th, 2000, 10:00 AM
explore explore is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: TX
Posts: 38 explore User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via AIM to explore
Me again :-).
Can someone tell me or point me in the direction (url reference) of how to create a html form that a user fills out to search my MySql database..either by first name or id number or something? And can add to the database too within the same form??

Thanks in advance!


Reply With Quote
  #2  
Old July 17th, 2000, 01:29 PM
dave981 dave981 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Minneapolis, MN
Posts: 48 dave981 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 53 sec
Reputation Power: 9
Send a message via ICQ to dave981
Code from Page with TextBox for search terms:

<form method="post" action="SearchPage.php3">
Search Postings:
<input type="Text" name="Search" size="20" maxlength="30">
<input type="Submit" name="submit" value="Search">
</form>


Code from page that Actually does the search (SearchPage.php3)

<MySQL connect stuff to your database>

$result = mysql("$DBTouse","SELECT * FROM $Table WHERE (ISBN LIKE '%$Search%' OR Title LIKE '%$Search%' OR Author LIKE '%$Search%') AND (TO_DAYS(Expires) >= TO_DAYS(Current_Date)) ORDER BY Course,Price");


This is what I use for users to Search the Booksale Classifieds on my site.

hope that helps,
Dave

Reply With Quote
  #3  
Old July 17th, 2000, 04:18 PM
explore explore is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: TX
Posts: 38 explore User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via AIM to explore
Thanks Dave!

However, I am using Perl, not PHP. Any ideas with Perl?


Reply With Quote
  #4  
Old July 17th, 2000, 04:23 PM
cynthia cynthia is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: CA USA
Posts: 2 cynthia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Are you using Perl and DBI? Just use the same SQL statement inside DBI.


<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by explore:
Thanks Dave!

However, I am using Perl, not PHP. Any ideas with Perl?
[/quote]


Reply With Quote
  #5  
Old July 18th, 2000, 10:17 AM
explore explore is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: TX
Posts: 38 explore User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via AIM to explore
Cool! I got it to search my database and display the results. I still need to be able to "add comments" once I retrieved that particular data in the database..

ie did a query on explore
received explore's address information
need to make changes to the street address

Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Searching MySql Database via web form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway