"shaz kahn" <sh*********@excite.com> wrote in message
news:eR**************@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
-----------------------------------------------------