I'd really appreciate some help with this code. I have two separate functions that both check a table in my database for data against an ID that is fetched from the page's URL. On displaying the information, I want to use an IF ELSE statement to check if there are results from either of those functions, and if there are no results, post nothing, and if there are results, post the results. At the moment I have this code:
<?php
if (getArtistsBySongId($id) == NULL AND getGroupsBySongId($id) == NULL) {
} else {
include 'songs/getsongcredits.php';
}
?>
While the code works in displaying my data, it seems to be ignoring my IF statement, and just posting what's in the include. Would someone be able to let me know the correct way to do this if else statement?
Thanks, Mitch
Aucun commentaire:
Enregistrer un commentaire