Created
June 17, 2019 19:13
-
-
Save raessafathulalim/31db883fd345708e1300b8459c17caf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function insert_inyong(array $data) { | |
$_prepared = array(); | |
foreach ($data as $col => $val) | |
$_prepared[$col] = $this->db->escape($val); | |
$this->db->query('INSERT INTO `data` (`'.implode('`,`',array_keys($_prepared)).'`) VALUES('.implode(',',array_values($_prepared)).');'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment