Support php-encoded MySql queries? | WordPress.org

[ad_1]

This is a question about using WPCode to include PHP on WordPress website.

I implement websites in PHP and often use MySql databases and access tables using queries within PHP scripts. For example, this lists all rows in a table (derived from an actual PHP script):

<?php
include("/srv/www/.....") [ [this opens and connects the table]
$query="SELECT * FROM TABLE_NAME; ";
$result=mysqli_query($connect, $query);
while($row=mysqli_fetch_assoc($result)) {
echo $row['ID'];
echo $row[NAME]:
[and additional fields]
}
?>

FWIW, this is extracted from a code module of a website running on a Linux server and Apache.

Will this work with WPCode?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer