problem (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Guest -> problem (3/1/2001 23:13:00)

ok i have a custom query that ive entered into DRW. The query is as follows

SELECT person.lastname, person.firstname, photo.file
FROM person, photo
WHERE person.personID = photo.personID

This query returns every persons last name, first name, and path to there photo file (which i have a link to show photo). Problem is I have many records. What i would like to be able to do is have this query so it will allow me to search by the persons LAST NAME, so that when the page is viewed, the user can Input a last name, hit submit and have that persons last name, first name and photo file returned. Any ideas?? im stumped.





Guest -> RE: problem (3/1/2001 23:34:00)

SELECT person.lastname, person.firstname, photo.file
FROM person, photo
WHERE person.lastname = '%%Name%%' and person.personID = photo.personID

That is your SQL string and you will need to create a textbox whose name in this case is name and give the user a submit button that posts the results to the page where your DRW





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875