Skip to content

Instantly share code, notes, and snippets.

@vielhuber
Last active September 22, 2017 23:12
Show Gist options
  • Save vielhuber/033689574e2fd6f3720a to your computer and use it in GitHub Desktop.
Save vielhuber/033689574e2fd6f3720a to your computer and use it in GitHub Desktop.
DB Insert #joomla
$db->setQuery($db->getQuery(true)->insert($db->quoteName('#__js_table'))
->columns($db->quoteName(array('created','name','subtitle','pos','content','parent_id')))
->values(implode(',', array(
$db->quote(date('Y-m-d H:i:s',strtotime('now'))),
$db->quote($name),
"NULL",
$pos,
"NULL",
(($parent_id != "")?($parent_id):("NULL"))
))))->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment