Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $myServer = "no";
- $myUser = "dont try stealing";
- $myPass = "my victims";
- $myDB = "database info";
- //connection
- $dbhandle = mssql_connect($myServer, $myUser, $myPass)
- or die("Couldn't connect to SQL Server on $myServer");
- //select db
- $selected = mssql_select_db($myDB, $dbhandle)
- or die("Couldn't open database $myDB");
- //time to fuck these niggaz up
- $query = "INSERT INTO `users` ( `userId`, `username`, `password`, `email`, `typeId`, `credit`, `regDate` ) VALUES ( '1', 'Zeus', 'Scooze?', 'zeus@lmfaox.com', '1', '1000', '1313770109' );"
- //execute
- $result = mssql_query($query);
- $numRows = mssql_num_rows($result);
- echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>";
- //let's see how it's going?
- while($row = mssql_fetch_array($result))
- {
- echo "<li>" . $row["id"] . $row["name"] . $row["year"] . "</li>";
- }
- //finito
- mssql_close($dbhandle);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement