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
https://forums.phpfreaks.com/topic/31788-indexing-a-recordset/
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
https://forums.phpfreaks.com/topic/31788-indexing-a-recordset/#findComment-147444
Share on other sites

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.