Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
$updatePlayers = "UPDATE `players` SET `name` = ?, `score` = ?, `active` = ?\n".
|
||||
"WHERE `jerseyNum` = ?";
|
||||
$dbh = new PDO( "mysql:dbname=db;host=localhost", "username", "password" );
|
||||
|
||||
$updateStatement = $dbh->prepare( $updatePlayers );
|
||||
|
||||
$updateStatement->bindValue( 1, "Smith, Steve", PDO::PARAM_STR );
|
||||
$updateStatement->bindValue( 2, 42, PDO::PARAM_INT );
|
||||
$updateStatement->bindValue( 3, 1, PDO::PARAM_INT );
|
||||
$updateStatement->bindValue( 4, 99, PDO::PARAM_INT );
|
||||
|
||||
$updateStatement->execute();
|
||||
|
||||
// alternatively pass parameters as an array to the execute method
|
||||
$updateStatement = $dbh->prepare( $updatePlayers );
|
||||
$updateStatement->execute( array( "Smith, Steve", 42, 1, 99 ) );
|
||||
Loading…
Add table
Add a link
Reference in a new issue