I am currently trying to create a blog and have come as far as learning php/mysql (I already new perl so it wasn't hard to learn)
In development, the site I have at the current stage works fine, *but* when I upload it to a PHP enabled webserver, it seems to fail on some of my SQL querys and that kills the whole page.
the page works when I comment out the code
Code:
$query = "SELECT DISTINCT LEFT(EntryDate, 7) AS DistinctMonths FROM Entries ORDER BY EntryDate DESC";
$results = mysql_query($query) or die('/nError query (query 4) failed');
$monthcount = 0;
and that is the first peice of code that is throwing up the 'die' error
secondly when I comment that last peice out, the code
Code:
$query = "SELECT Eid, EntryTime, EntryDate, EntryTitle, MusicTitle, MusicArtist, Body FROM entries ORDER BY EntryDate DESC, EntryTime DESC LIMIT $offset, $entrycount";
$result = mysql_query($query) or die('/nError query (query 5) failed');
runs, but also throws up the 'die' error.
If anyone can help me and explain why this is then I would be throughly grateful...
|