what does ":variable" mean ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aneuryzma
Forum Contributor
Posts: 106
Joined: Sat May 17, 2008 7:03 am

what does ":variable" mean ?

Post by aneuryzma »

What does it mean the ":" in front of phpro_username in the following line ?

Code: Select all

$stmt = $dbh->prepare("INSERT INTO phpro_users (phpro_username, phpro_password ) VALUES (:phpro_username, :phpro_password )");
 
thanks
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: what does ":variable" mean ?

Post by pickle »

Since the statement is being prepared, I'd imagine those are wildcards that will be substituted for a actual values when they are bound.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply