PHP怎样调用MySql中带多个参数的存储过程。能否给个简单的例子?谢谢

解决方案 »

  1.   

    /**
     * Begin a transaction in MySQL
     *
     * @param string $sTableName
     */
    public function beginTransaction($sTableName) {
    if (!isset($this->aLocked[$sTableName])) {
    $this->aLocked[$sTableName] = 0;
    } $this->aLocked[$sTableName]++; if ($this->aLocked[$sTableName] == 1) {
    $this->query('START TRANSACTION', 'LOCK');
    }
    } /**
     * End a transaction in MySQL
     *
     * @param string $sTableName
     */
    public function endTransaction($sTableName) {
    if ($this->aLocked[$sTableName] != 0) {
    $this->aLocked[$sTableName]--;
    } if (array_sum($this->aLocked) == 0) {
    $this->query('COMMIT', 'UNLOCK');
    }
    }