thinkphp How do I get the value of sequence?
Oracle database, there is a sequence called aid, you need to get aid.nextval when inserting data, and then splicing several letters to insert as field values. Originally in the database can be "select Aid.nextval from Dual", then use thinkphp words, how to obtain? thinkphp this piece of comparative dish, please specific point said, thank the Great Fairies ~ ~
Share to:
------Solution--------------------
TP bored around a circle, and finally carried out here
/**
+----------------------
* SQL query
+----------------------
* @access Public
+----------------------
* @param mixed $sql SQL instructions
* @param boolean $parse do I need to parse SQL
+----------------------
* @return Mixed
+----------------------
*/
Public Function query ($sql, $parse =false) {
$sql = $this->parsesql ($sql, $parse);
return $this->db->query ($sql);
}