Jump to content


Check out our Community Blogs

Komplexia

Member Since 17 Aug 2013
Offline Last Active May 03 2016 03:04 PM
-----

Posts I've Made

In Topic: Using Pdo For Database Access (Beginner)

17 August 2013 - 06:09 PM

Hi and thanks for this great tutorial!

 

I began to learn PDO today and after several hours I finally came across your tutorial that is simple enough for me to understand and with code that really work. There is only one tiny problem with the code.

This doesn't work:
$stmt->bindParam(":name", 'the_desired_name');

I get this error message: Fatal error: Cannot pass parameter 2 by reference...

I solved it like this:
    $name = 'the_desired_name';
    $stmt->bindParam(":name", $name);
 

Thanks again

Suzanne


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download