I am a newbie to Wordpress and php. I have a table in my database which keeps on getting updated by the users. I just wanted to write a code which gets the information from the table and display some of the information from the table in one of my page. For that purpose, I am using the following code.
<?php
$number_rows= $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->daviddgl_wp1.SaveContactForm7_7" );
$x=1;
while ($x<$number_rows) {
$results = $wpdb->get_results("SELECT ticket, name,email FROM $wpdb->daviddgl_wp1.SaveContactForm7_7 WHERE id = $x"
echo $results;
$x++;
}
?>
It gives me the following error.
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /home/daviddgl/public_html/wp-content/themes/panoramic-child/cleanphppage.php on line 38
which I was not able to figure it out.
How to correct this??
Kindly note that, in future I may style the output, that is I may want to use css to style the table which I am creating using the while loop.
Thank you for helping!!!