php/sqli query
-
I tried creating a shortcode with the Code Manager plugin using the code below, but it crashed when I tried to run it. It is a simple repeating query just to test the concept and it works on its own (outside of WordsPress) just fine.
Is this beyond the shortcode capabilities? If not how do I fix it to make it work?
<?php require_once('https://pabirds.org/Connections/siteguide2018.php'); ?> <?php require_once('https://pabirds.org/webassist/mysqli/rsobj.php'); ?> <?php $Recordset1 = new WA_MySQLi_RS("Recordset1",$siteguide2018,0); $Recordset1->setQuery("SELECT * FROM publications"); $Recordset1->execute(); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <div> <p>Test PHP/SQL</p> <p> </p> </div> <p> </p> <?php $wa_startindex = 0; while(!$Recordset1->atEnd()) { $wa_startindex = $Recordset1->Index; ?> <div> <p><?php echo($Recordset1->getColumnVal("PubFileName")); ?></p> </div> <?php $Recordset1->moveNext(); } $Recordset1->moveFirst(); //return RS to first record unset($wa_startindex); unset($wa_repeatcount); ?> </body> </html>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘php/sqli query’ is closed to new replies.