Jump to content

Indexing a Recordset


recset

Recommended Posts


I have two tables. (lets refer them as [b]Table A[/b] and [b]Table B[/b])
I am trying to show how many records are in [b]Table B[/b], based off of the record ID of [b]Table A[/b] (the Record ID of Table B will sort Table A)
All of this has to appear in a Repeated Region.

Here is what I have so far, please help:


[code]mysql_select_db($database_vlot, $vlot);
$query_ShowComments = "SELECT * FROM comments WHERE WISDOM_ID = (SELECT max(id) FROM wisdom)";
$ShowComments = mysql_query($query_ShowComments, $vlot) or die(mysql_error());
$row_ShowComments = mysql_fetch_assoc($ShowComments);
$totalRows_ShowComments = mysql_num_rows($ShowComments);[/code]

Thanks
Link to comment
Share on other sites

How would I implement that into my current script?

[code]mysql_select_db($database_vlot, $vlot);
$query_ShowComments = "SELECT * FROM comments WHERE WISDOM_ID = (SELECT max(id) FROM wisdom)";
$ShowComments = mysql_query($query_ShowComments, $vlot) or die(mysql_error());
$row_ShowComments = mysql_fetch_assoc($ShowComments);
$totalRows_ShowComments = mysql_num_rows($ShowComments);[/code]

More or less, I do not need to code the 'show record count' in the above piece.
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.