Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function insetData($menus){
- $config = new ConfigSettings();
- DB::init($config->db['host'], $config->db['username'], $config->db['password'], $config->db['database']);
- $result = DB::query("SELECT * FROM vu67t_assets ORDER BY id DESC LIMIT 1");
- $asset_id = $result[0]['id'] + 1;
- $title = "test";
- $alis = "test";
- $state = "1";
- $catid = "2";
- $introtext = '<p>This is some Content</p>';
- $insertArticle = DB::query("INSERT INTO vu67t_content (asset_id, title, alis, state, catid, introtext) VALUES ( ?. ?, ?, ?, ?, ?)", array($asset_id, $title, $alis, $state, $catid, $introtext));
- if(!$insertArticle) {
- echo 'Database Error: '.DB::getError();
- }else{
- echo "inserted?";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement