As seen here.
(edit: I think I temporarily fixed the problem by renaming the ids directly in the mysql table, they were previously 7,10,9 in that order and are now 1,2,3)
There are 2 reviews that link to eachother instead of themselves.
here is the code I use to display them, can anyone figure out what's wrong here:
Code: Select all
$_info = array();
$_info = get_titles_ids();
$title = preg_grep('/^' . $letter . '/i', $_info['titles']);
foreach ($title as $list_item)
{
$id_key = array_search($list_item, $_info['titles']);
$id = $_info['ids'][$id_key];
echo '<a href="?page=review&action=review&rid=' . $id . '">' . $list_item . '</a>';
}Code: Select all
$query = "SELECT title FROM alc_reviews";
$result = mysql_query($query) or die ('I cannot receive from the database because: ' . mysql_error());
while($row = mysql_fetch_row($result))
{
$_info['titles'][] = $row[0];
}
$query = "SELECT id FROM alc_reviews";
$result = mysql_query($query) or die ('I cannot receive from the database because: ' . mysql_error());
while($row = mysql_fetch_row($result))
{
$_info['ids'][] = $row[0];
}