Home > Archive > ASP > February 2006 > problems with asp
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| shaz kahn 2006-02-23, 6:55 pm |
|
hi guys ive just started this forum and ASP programming and so far its
not too bad I was wondering if any one can help. Am creating a book
search website which sellers can add books to the database with their
details for users to contact them. Am trying to search from two tables
seller and books, where the users will enter a book title in a textbox
if that title exits it will display book title and seller's pnumber with
their e-mail and name. Please help me ive been working on this for w s
without any result.
your response will be much appreciated.
i have two tables seller and books
book(table)
books
bookID
pnumberID
author
price
keyword
title etc..
seller(table)
bookID
pnumber
password
name
surname
email etc...
*** Sent via Developersdex http://www.developersdex.com ***
| |
| Paxton 2006-02-23, 6:55 pm |
|
shaz kahn wrote:
> hi guys ive just started this forum and ASP programming and so far its
> not too bad I was wondering if any one can help. Am creating a book
> search website which sellers can add books to the database with their
> details for users to contact them. Am trying to search from two tables
> seller and books, where the users will enter a book title in a textbox
> if that title exits it will display book title and seller's pnumber with
> their e-mail and name. Please help me ive been working on this for w s
> without any result.
> your response will be much appreciated.
>
> i have two tables seller and books
> book(table)
> books
> bookID
> pnumberID
> author
> price
> keyword
> title etc..
>
> seller(table)
> bookID
> pnumber
> password
> name
> surname
> email etc...
>
Did your post get truncated? I don't see a question. What's the
problem you need help with?
/P.
| |
| Phillip Windell 2006-02-24, 6:55 pm |
| "shaz kahn" <shaz_is1982@excite.com> wrote in message
news:eRkaUyLOGHA.3460@TK2MSFTNGP15.phx.gbl...
> seller and books, where the users will enter a book title in a textbox
> if that title exits it will display book title and seller's pnumber with
> their e-mail and name.
It should have been asked in the "asp.db" group but,...
I would use better tables names and different fields. I would also use
naming conventions. Table names begin with "tbl", field names beging with
"fld".
tblBooks
fldBookID
fldPnumber
fldAuthor
fldPrice
fldTitle
tblAuthors
fldAuthorID
fldName
fldSurname
fldEmail
fldPassword
fldBookID
The SQL Statement might be something similar to this:
(I'm not an SQL or database expert)
SELECT
tblBooks.fldBookID,
tblBooks.fldTitle,
tblBooks.fldAuthorID,
tblAuthor.fldName,
tblAuthor.fldSurname,
tblAuthor.fldEmail
FROM
tblBooks
INNER JOIN
tblAuthor
ON
tblBooks.fldBookID = tblAuthor.fldBookID
WHERE
tblBooks.fldTitle
LIKE
%"some title name here"%
I recommend that you create a Parameterized Query (if using Access) or a
Stored Proceedure (if using SQL Server) and don't put raw SQL statements in
the ASP code.
And you should be asking this type of question in:
"microsoft.public.inetserver.asp.db"
--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
-----------------------------------------------------
|
|
|
|
|