Jump to content

confusion


prezident

Recommended Posts

$sql = "INSERT INTO entries(title, entry) VALUES (?, ?)";
$stmt = $db->prepare($sql);
$stmt-> execute(array($title, $entry));
$stmt->closeCursor();

I'm confused but i think i gotta just stop the self doubt -> i'm confused about what these code does ok

i know the insert statement

$stmt = $db->prepare($sql) = i'm guessing this prepares the $sql variable and prepares it for execution and stores the (?, ?) as an array with ($title, $entry) keys. am i right ?

 

Link to comment
https://forums.phpfreaks.com/topic/223112-confusion/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.