This is a discussion on pear isn't returning affectedRows within the PHP Language forums, part of the PHP Programming Forums category; $types = array('text','text','text','date','text','text','t ext','integer','integer','integer','integer','inte ger','integer','integer','integer','integer','...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
$types =
array('text','text','text','date','text','text','t ext','integer','integer','integer','integer','inte ger','integer','integer','integer','integer','inte ger','text','text'); $st = $this->mdb2->prepare("INSERT INTO girls (email,name,surname,dateOfBirth,country,city,natio nality,tall,weight,hairColor,eyeColor,education,pr ofession,maritalStatus,children,smokingHabits,drin kingHabits,aimOfSearch,notes)" ."VALUES (:email,:name,:surname,:dateOfBirth,:country,:city ,:nationality,:tall,:weight,:hair,:eye,:education, :profession,:maritalStatus,:children,:smokingHabit s,:drinkingHabits,:aimOfSearch,:notes)", $types); $data = array('email' => $this->email, 'name' => $this->name, 'surname' => $this->surname, 'dateOfBirth' => $this->dateOfBirth,'country' => $this->country,'city' => $this->city,'nationality' => $this->nationality,'tall' => $this->tall, 'weight' => $this->weight,'hair' => $hair,'eye'=>$eye,'education'=>$education,'profess ion'=>$profession,'maritalStatus'=>$maritalStatus, 'children'=>$this->children,'smokingHabits'=>$smokingHabits,'drinkin gHabits'=>$drinkingHabits,'aimOfSearch'=>$this->aimOfSearch,'notes'=>$this->notes); $st=$this->mdb2->prepare("insert into girls(email) values ('d.cz')"); $affectedRows = $st->execute(); if (PEAR::isError($st)) die($st->getMessage()); var_dump($affectedRows); affectedRows is an object and not int. any idea why? |