prezident Posted January 1, 2011 Share Posted January 1, 2011 $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 More sharing options...
BlueSkyIS Posted January 1, 2011 Share Posted January 1, 2011 http://www.google.com/search?client=safari&rls=en&q=php+prepared+statements&ie=UTF-8&oe=UTF-8 Link to comment https://forums.phpfreaks.com/topic/223112-confusion/#findComment-1153567 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.