Jump to content

Record Set Filtering


deviant.studio

Recommended Posts

Hi everyone, new here, I found one post relevant to this, but it was from 2007 and still had no answer so I thought I'd ask it.

 

I have one recordset "dates"

"SELECT session_date FROM jp_sessions GROUP BY session_date "

 

And this does what it should. Displays the Unique dates. Now the next task, is to use those dates as a filter on another record set. So I used this statement.

"SELECT session_time FROM jp_sessions WHERE session_date = %s", GetSQLValueString($colname_times, "date"));
$times = mysql_query($query_times, $janpat) or die(mysql_error());
$row_times = mysql_fetch_assoc($times);
$totalRows_times = mysql_num_rows($times);

 

And that works almost as well as it should, with one minor flaw. It only returns the times for the first record. Do I have to create some kind of repeat to get the rest? I'm not sure, and Im at a loss.

 

So In the end I should achieve something like this.

 

01/11/2009

 

10:50:00

12:50:00

15:50:00

 

01/12/2009

 

9:35:00

10:55:00

12:50:00

11:50:00

 

01/13/2009

 

10:50:00

12:50:00

15:50:00

 

But right now I just get:

 

01/11/2009

 

10:50:00

12:50:00

15:50:00

 

01/12/2009

 

01/13/2009

 

So if someone can let me know what to do, that would be great. Im so at a loss and I think I am wearing down my floor by walking in circles.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.