| รันคำสั่ง Sql ใน Model โดยไม่ต้องใช้ JTable |
|
|
|
| Tuesday, 20 January 2009 16:51 | |
|
รันคำสั่ง Sql ใน Model โดยไม่ต้องใช้ JTable ตัวอย่าง sql ส่วนที่สำคัญคือ ?$this->_db->Quote();? เพื่อแปรง Quote ในข้อความป้องกัน hack sql ?$this->_db->setQuery($sql); เตรียมคำสั่ง sql ??? ???? ?$this->_db->query($sql);? รันคำสั่ง sql เหมือน mysql_query() $sql = "UPDATE member ?? ??? ??? ??? ??? ??? ?SET ?? ??? ??? ??? ??? ??? ?admin_approve=".$this->_db->Quote($post['admin_approve']).", ?? ??? ??? ??? ??? ??? ?admin_msg=".$this->_db->Quote($post['admin_msg']).", ?? ??? ??? ??? ??? ??? ?you_yoursoulmate=".$this->_db->Quote($post['you_yoursoulmate']).", ?? ??? ??? ??? ??? ??? ?you_yourtopic=".$this->_db->Quote($post['you_yourtopic']).", ?? ??? ??? ??? ??? ??? ?favourite_activity=".$this->_db->Quote($post['favourite_activity'])." ?? ??? ??? ??? ??? ??? ?WHERE mem_id=".$post['mem_id'].""; ?? ??? ???? $this->_db->setQuery($sql); ?? ??? ???? $this->_db->query($sql); |
Latest News
- A-1 Skyraider
- Top 50 Fastest Aircraft
- Federal Aviation Administration (FAA)
- The United States' air traffic control system is the safest in the world.
- ANTONOV 225 เครื่องบินที่ใหญ่ที่สุดในโลก
- Add Javascript to JHTML genericlist booleanlist
- Show messages notices error form Componet
- JAS 39 Gripen
- JPATH_COMPONENT Site Administrator component
- radiolist From Database
- 304 Industrial Park 2 Co., Ltd.
- A&P Siam Neo Group PCL.
- 3M Thailand Ltd.
- A. Bill. Art. Industrial Co.,Ltd.
- A-Tech Metal Works Co.,Ltd.
Latestnews
Autos Motor
| Autos |
| Autos |
![]() |
|



