Custom Page

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
austinl
User
Posts: 38

Custom Page

Post by austinl »

I am having issues with my custom page. Can someone please help me correct my code?

<?php
$dbhelper = new cems_db();
?>
<div class="panel panel-primary">
<div class="panel-heading text-center">
<h2>Announcements</h2>
</div>

	<div class="panel-body">
		<?php
		$sql = "SELECT
		users.first_name AS User,
		announcements.Subject AS Subject,
		announcements.Message AS Message,
		FROM
		assignments
		JOIN users ON users.ID = announcements.User";
		echo $dbhelper->ExecuteHtml($sql, array("fieldcaption" => TRUE, "tablename" =>
		array("users", "announcements")));
		?>
	</div>
</div>

mobhar
User
Posts: 11736

Post by mobhar »

So, what is your issue exactly?


austinl
User
Posts: 38

Post by austinl »

It is not displaying any data in the panel.


mobhar
User
Posts: 11736

Post by mobhar »

Make sure the SQL is valid and returns the result properly, by executing it first using your Database manager.


danielc
User
Posts: 1601

Post by danielc »

austinl wrote:
FROM assignments JOIN users ON users.ID = announcements.User";

Double check if your table name is assignments or announcements.


Post Reply