Join Just Producing One Entry
I'm trying to JOIN a user to a Blog Entry in a repeat region.
There are 4 Blog Entries in the Database and it's only returning a single users blog. I want all the Blog Entries with their respective Authors(User). This is the first time I've tried to JOIN a second table to a query since updating to mysqli. Has something changed in the way queries and repeats work when JOINing?
Here is my mysqli code:
$rsBlogEntry = new WA_MySQLi_RS("rsBlogEntry",$connSiteDB,10);
$rsBlogEntry->setQuery("SELECT * FROM blogentry JOIN users ON users.userID = blogentry.blogentryUserID ORDER BY blogentryTimestamp ASC LIMIT 10");
Here is the repeat region:
$wa_startindex = 0;
$wa_startindex = $rsBlogEntry->Index;
Title: <?php echo($rsBlogEntry->getColumnVal("blogentryTitle")); ?>
Author: <?php echo($rsBlogEntry->getColumnVal("userFirstName")); ?> <?php echo($rsBlogEntry->getColumnVal("userLastName")); ?>
$rsBlogEntry->moveFirst(); //return RS to first record