Phpscaffold og WordPress

Phpscaffold skaber en række filer, der kan inkluderes i et plugin. Men filerne skal editeres en anelse. Linjen include(‘config.php’);  skal fjernes, og resten burde teoretisk set fungere a la det her:

$Id = (int) $_GET['Id']; 
// mysql_query("DELETE FROM `kbnNotes` WHERE `Id` = '$Id' ") ; 
$wpdb->query("DELETE FROM `kbnNotes` WHERE `Id` = '$Id' ");
echo (mysql_affected_rows()) ? "Row deleted.<br /> " : "Nothing deleted.<br /> ";

(NB: jeg har ikke afprøvet koden endnu, så det her er kun noter…)

Enable Notifications OK No thanks

We use cookies - more information

Multimusen.dk will set a few cookies from Doubleclick, Google and the Social Media plugins they ay set some cookies. Some of my pages use APIs - such as YouTube, LinkedIn, Google Fonts, Google Maps, Mapbox, Spotify, Jetpack, Twitter, Facebook &c.. Such plugins may set the odd cookie.

Close