Jump to content
Updating IPB tonight Read more... ×

Archived

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

dadoonan

empty results page

Recommended Posts

I'm having trouble getting the correct results on a list page.

The query on the first page is pulling the name of active authors from the d/b and linking to a list page that is supposed to return essay titles by the requested author. The list page however is not returning any results.

The Author.ID, which is showing up in the URL, is being passed from the first page to the list page (http://localhost/Der/writings/author.php?ID=5) but the list page is not accepting that variable.

This is my first php site. Sorry for so basic a question.

---------------------
List page query =

mysql_select_db($database_connDer, $connDer);
$recordID = $_GET['recordID'];
$query_GetAuthorList = "SELECT Writings.Writings_Author, Writings.Writings_Title, DATE_FORMAT(Writings_Date, '%M %D, %Y') as Writings_Date, Writings.Writings_Text, Writings.ID, Author.Autholr_Name, Author.ID FROM Writings, Author
WHERE Author.Autholr_Name = Writings.Writings_Author and
Author.ID = '$recordID'
ORDER BY Writings.Writings_Date desc";
$GetAuthorList = mysql_query($query_GetAuthorList, $connDerbyTrail) or die(mysql_error());
$row_GetAuthorList = mysql_fetch_assoc($GetAuthorList);
$totalRows_GetAuthorList = mysql_num_rows($GetAuthorList);

david

Share this post


Link to post
Share on other sites
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] (http://localhost/Der/writings/author.php?ID=5) but the list page is not accepting that variable.
[/quote]

if that is the exact URL (at least the ID=5 part) instead of
[code]
$recordID = $_GET['recordID'];
[/code]

You'll want
[code]
$recordID = $_GET['ID'];
[/code]

Share this post


Link to post
Share on other sites

×

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.