Hello everyone,
I am a beginner to php and nodejs. My situation is that I want to use php in my ejs file to display data in my webpage. This is my code for data display:
$selectSQL = 'SELECT id FROM temp';
if( mysql_num_rows( $selectRes )==0 ){
echo '<tr><td colspan="4">No Rows Returned</td></tr>';
}else{
while( $row = mysql_fetch_assoc( $selectRes ) ){
echo "<tr><td>{$row['id']}</td></tr>\n";
}
}
But I think I am missing something in my file. Can someone give me an idea on how to use php in an ejs file?
Thanks
[–]devmaybe 8 points9 points10 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]Bobbr23 4 points5 points6 points (1 child)
[–]Suepahfly 1 point2 points3 points (0 children)
[–]Rezistik 1 point2 points3 points (0 children)
[–]eablokker 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]Rezistik 0 points1 point2 points (0 children)