emptybg

Test via XYZ PHP Code – PHP code snippet –> shortcode. Werkt via de global wpdb = connectie met lkokale db. Deze code geeft 403 error => probleem by combell???

 
				
					<?php

global $wpdb;
$result = $wpdb->get_results( "SELECT name, score FROM scores");

echo "<style>";
echo "body {font-family: Arial;}";

echo ".table_container { padding: 10px 12px 0px 12px;  border: 1px solid #ccc;  }";
echo ".table_container th { background-color:lightblue; color:white; font-weight:bold; border-left: 1px solid white;}";
echo "</style></head>";
echo "<body>";

echo "<div class=\"table_container\"><table>";
echo "<tr><th style=\"padding-left:10px;\">Name</th><th>Score</th></tr>";
foreach ($result as $row) {
	echo "<tr><td>" . $row->name . "</td><td>" . $row->score . "</td></tr>";
}
echo "</table></div>";

?>
				
			

Test via WP Data Access plugin: Data Publishing: Tables en dan onderstaande shortcode. Query mogelijk, vormgeving via CSS? Hoe link in waarde steken?

 
[wpdataaccess pub_id="1"]

Stylish Google spreadsheet:


 

Loading Data...

Stylish Google spreadsheet test 2:


 

Loading Data...

BrainBugs

digital sensemakers