wordpress template page error when select from database

ساخت وبلاگ

Vote count: 0

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";
?>
asked 51 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 336 تاريخ : پنجشنبه 31 تير 1395 ساعت: 18:20