
annnkay
|
| Posted: 02/07/2002, 9:59 AM |
|
why am i keep having error when i select from 2 table.1 been doing this search engine (copy some of the coding from the bookstore )and i did exactly as the command in the bookstore.but it keep having problem.but when i just select from only a table the search engine can run properly.....
|
|
|
 |
Andrew B
|
| Posted: 02/07/2002, 6:49 PM |
|
A code example? SQL code? A more detailed description would be helpful.
|
|
|
 |
annnkay
|
| Posted: 02/08/2002, 2:15 AM |
|
this is my sql statement :
sSQL = "select r.resource_name as rresourcename, " +
"r.category_name as rcategoryname, " +
"r.resource_id as resourceid, " +
"r.member_id as rresourceid, " +
"r.description as rdescrip, " +
"r.status as rstatus, " +
"r.price as rprice, " +
"b.resource_id as bresource_id " +
" from resource r, borrowing b " +
" where r.resource_id = b.resource_id ";
please help.....
|
|
|
 |
Nicole
|
| Posted: 02/08/2002, 5:11 AM |
|
Hello,
provide more details. Do you get any errors on the page?
Or search just doesn't work and no records are displayed?
It would be helpful for you to test sql query in query analyzer. To do it add print code in generated file right after line:
ASP
sSQL = sSQL & sWhere & sOrder
PHP
$sSQL .= $sWhere. $sOrder;
See does the query itself work.
|
|
|
 |
annnkay
|
| Posted: 02/08/2002, 8:38 AM |
|
hi nicole.the page that not work.the same error always pop up.
Sql...too few parameter,expeted 1.but then the coding seem the work if i only select data only from a table....it doesn't work at all with 2 table...and forgot to tell i'm using the jsp.
|
|
|
 |
Nicole
|
| Posted: 02/09/2002, 2:26 AM |
|
If you use a DSN connection you cannot use double double quotes (""any_val"") inside custom sql or custom code. Check it.
|
|
|
 |
|

|