Skip to content

Instantly share code, notes, and snippets.

@cvieth
Created February 14, 2013 15:28
Show Gist options
  • Save cvieth/4953538 to your computer and use it in GitHub Desktop.
Save cvieth/4953538 to your computer and use it in GitHub Desktop.
$query = $dbObject->prepare("INSERT INTO `promo_actimel-ch_data`
(
`locale`,
`code`,
`price`,
`check_price`,
`place`,
`gender`,
`surname`,
`lastname`,
`day_of_birth`,
`email`,
`street`,
`street_nr`,
`city`,
`postal_code`,
`depositor`,
`iban`,
`post-check-nr`,
`question_1`,
`question_2`,
`question_3`,
`permission_conditions`,
`permission_newsletter`
)
VALUES
(
:locale,
:code,
:price,
:check_price,
:place,
:gender,
:surname,
:lastname,
:day_of_birth,
:email,
:street,
:street_nr,
:city,
:postal_code,
:depositor,
:iban,
:post-check-nr,
:question_1,
:question_2,
:question_3,
:permission_conditions,
:permission_newsletter
);");
$query->bindParam('locale', $properties['locale']);
$query->bindParam('code', $properties['code']);
$query->bindParam('price', $properties['price']);
$query->bindParam('check_price', $properties['check_price']);
$query->bindParam('place', $properties['place']);
$query->bindParam('gender', $properties['gender']);
$query->bindParam('surname', $properties['surname']);
$query->bindParam('lastname', $properties['lastname']);
$query->bindParam('day_of_birth', $properties['day_of_birth']);
$query->bindParam('email', $properties['email']);
$query->bindParam('street', $properties['street']);
$query->bindParam('street_nr', $properties['street_nr']);
$query->bindParam('city', $properties['city']);
$query->bindParam('postal_code', $properties['postal_code']);
$query->bindParam('depositor', $properties['depositor']);
$query->bindParam('iban', $properties['iban']);
$query->bindParam('post-check-nr', $properties['post-check-nr']);
$query->bindParam('question_1', $properties['question_1']);
$query->bindParam('question_2', $properties['question_2']);
$query->bindParam('question_3', $properties['question_3']);
$query->bindParam('permission_conditions', $properties['permission_conditions']);
$query->bindParam('permission_newsletter', $properties['permission_privacy']);
var_dump($query);
if ($query->execute()) {
return $dbObject->lastInsertId();
} else {
return FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment