How does thinkphp obtain the sequence value? In the oracle database, there is a sequence named aid. when inserting data, you must first obtain aid. nextval, and then splice several letters to insert them as field values. In the database, you can select aid. nextval from dual. how can you obtain thinkphp? Thinkphp is a comparison dish. for details, thank you ~~
Reply to discussion (solution)
Tp is boring, and finally it is executed here.
/** + Response * SQL query + response * @ access public + response * @ param mixed $ SQL SQL command * @ param boolean $ whether parse needs to parse SQL + response * @ return mixed + ---------------------------------------------------------- */public function query ($ SQL, $ parse = false) {$ SQL = $ this-> parseSql ($ SQL, $ parse); return $ this-> db-> query ($ SQL );}
Tp is boring, and finally it is executed here.
/** + Response * SQL query + response * @ access public + response * @ param mixed $ SQL SQL command * @ param boolean $ whether parse needs to parse SQL + response * @ return mixed + ---------------------------------------------------------- */public function query ($ SQL, $ parse = false) {$ SQL = $ this-> parseSql ($ SQL, $ parse); return $ this-> db-> query ($ SQL );}
Thank you ~