Page 1 of 1

got me a database

Posted: Mon Jan 27, 2014 7:12 pm
by Vegan
After mangling my first database by placing it in the wrong data centre, I now have nominally what I was after????

Code: Select all

<?php

$conn = new PDO ( \"sqlsrv:server = tcp:b0p6dk8t8h.database.windows.net,1433; 

Database = hardcore-games\", \"webmaster\", \"{your_password_here}\");

$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n}\r\n

catch ( PDOException $e ) {
    print( \"Error connecting to SQL Server.\" );
    die(print_r($e));
}

?>
?>

so I wanted to conjure up some functions, create a table, then i can make forms to post to the table, but code on the backend is a tad tricky

Re: got me a database

Posted: Mon Jan 27, 2014 7:13 pm
by requinix
...Okay?

Re: got me a database

Posted: Tue Jan 28, 2014 1:08 pm
by Vegan
is it possible to can SQL into a function, so something like

SQL(command)

that will handle all my queries?

The problem is that select might return more than one record