Anyone see an error, I'm always getting 0 as a song_count and yes, i'm connecting tot he database and yes the database has an enrty. and yes $user variable is set.PHP Code:<?
$query = "SELECT * FROM `songs` WHERE `user` = '$user' ORDER BY `id` DESC";
$result = mysql_query($query);
$song_count = @mysql_num_rows($result);
if ($song_count == 0) {
echo "none";
} else {
while( list( $title, $artist ) = mysql_fetch_row( $result ) ){
echo "$title - $artist";
}
}
?>




Reply With Quote