Jump to content

custom nav recordset help


sporks

Recommended Posts

For every page I'm creating, there is going to be two set links leading to new rows.  I've created a nav recordset:

SELECT chooseTitle

FROM chooseadventure

WHERE pastID = chooseID

 

2 rows have the same number past ID as 1 row's choose ID.  However, nothing displays.  I have a feeling that the code is just looking at the current row which is why it doesn't see the other two rows in the table though I have no idea how to fix this.  Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/103265-custom-nav-recordset-help/
Share on other sites

Can you post the exact SQL query here?

 

The way you describe your table, it sounds like it's impossible to have a row where chooseID = pastID. For each row, either the pastID is set or the chooseID is set. But your query is looking for rows that have both the chooseID and pastID set and are equal.

 

This may or may not work.

SELECT ca1.chooseTitle
FROM chooseadventure AS ca1
JOIN chooseadventure AS ca2 ON ca1.pastID = ca2.chooseID

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.