Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Searching multiple tables

Posted 27 Apr 2005 16:36:18
1
has voted
27 Apr 2005 16:36:18 adam partridge posted:
basically i want to return records from a search from 2 seperate tables. is there a way of combing the results so i can loop through them rather than create two seperate looped regions ?

Replies

Replied 27 Apr 2005 18:29:07
27 Apr 2005 18:29:07 Chris Charlton replied:
Are the two tables the same strucutre? If not, then you just need to do a more advanced SQL query.

~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
Replied 28 Apr 2005 17:57:24
28 Apr 2005 17:57:24 adam partridge replied:
no the 2 tables are of different structure . can u give me an example of how to do this please

Replied 01 May 2005 16:11:45
01 May 2005 16:11:45 Wim Conix replied:
Hello,

You have to use SQL INNER JOIN
JOIN ON the logged user ID.

Example :

FROM Jobs INNER JOIN Users ON Jobs.User = Users.ID

Hope this helps,

Wim
Replied 03 May 2005 14:00:10
03 May 2005 14:00:10 adam partridge replied:
there is no matching reference between the 2 tables

its to search the content from an entire site

Replied 03 May 2005 16:35:04
03 May 2005 16:35:04 Chris Charlton replied:
Well, then it'll be one long SELECT statement, I'm assuming.

~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>

Reply to this topic