got me a database

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
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

got me a database

Post 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
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: got me a database

Post by requinix »

...Okay?
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: got me a database

Post 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
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply