Jump to content

empty results page


dadoonan

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
Link to comment
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]
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.