I have take the page.php page and i have created a new template page named mytemplatepage.php The page mytemplatepage.php works normally untill i try to add an sql query. when i add the bellow code the page gives http 500 error.
<?php
global $wpdb;
$sqlresults = $wpdb->get_results(
"SELECT id, CategoryName
FROM wp_SimParts"
);
?>
if i remove the code and just leave
<?php
?>
the page load normally. if i put an echo on the php code the page again crashes with http 500 error
<?php
echo "hello there";
?>
