Hey I would like to ask you a couple of things :)
The first one is: What does this do?: $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); Do you recommend me to use it?
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
And the second one is: Whats the difference between: while ($i=$res->fetch(PDO::FETCH_ASSOC)) And while ($i=$res->fetch())
while ($i=$res->fetch(PDO::FETCH_ASSOC))
while ($i=$res->fetch())
Here is what you’re looking for :)
[quote=PHP doc]PDO::ATTR_ERRMODE: Error reporting.[/quote]
[quote=PHP doc]PDO::ERRMODE_EXCEPTION: Throw exceptions.[/quote]
[quote=PHP doc]PDO::FETCH_ASSOC: returns an array indexed by column name as returned in your result set[/quote]
And here is the link with the full doc
This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.
By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.