Skip to content

Instantly share code, notes, and snippets.

@vielhuber
Last active September 22, 2017 23:12
Show Gist options
  • Save vielhuber/229d2c4e258d22db1960 to your computer and use it in GitHub Desktop.
Save vielhuber/229d2c4e258d22db1960 to your computer and use it in GitHub Desktop.
DB Update #joomla
$fields = array(
$db->quoteName('name').' = '.($db->quote($_POST["name"])),
$db->quoteName('content').' = '.($db->quote($_POST["content"])),
$db->quoteName('subtitle').' = '.(($_POST["subtitle"] != "")?($db->quote($_POST["subtitle"])):("NULL")),
$db->quoteName('content').' = '.(($_POST["content"] != "")?($db->quote($_POST["content"])):("NULL"))
);
$db->setQuery($db->getQuery(true)->update($db->quoteName('#__js_table'))->set($fields)->where($db->quoteName('ID').' = '.$db->quote($_GET["ID"])))->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment