PHP 8.5.0 Alpha 4 available for testing

Voting

: max(five, four)?
(Example: nine)

The Note You're Voting On

mail at horn-online-media dot de
13 years ago
hi,

just a qick note to get started without problems when using quotation: PDO does NOT replace given variables if they are wrapped in quotationmarks, e.g.

<?php

$st
= $db->prepare( '
INSERT INTO fruits( name, colour )
VALUES( :name, ":colour" )
'
;
$st->execute( array( ':name' => 'Apple', ':colour' => 'red' ) );

?>

results in in a new fruit like

-> Apple, :colour

without the colour beeing replaced by "red". so leave variables WITHOUT the quotation - PDO will do.

<< Back to user notes page

To Top