anyone can help me change this query to be compatible to my database? here is the script
//Run the querys if all goes well
function error_cex() {
echo "An account with that name already exists";
include('footer.php');
exit(); }
$queryc = "SELECT id FROM Account WHERE id = '$user'";
$resultc = mssql_query($queryc);
$numc = mssql_num_rows($resultc);
if ($numc > 0) {
error_cex(); }
else {
$query = "INSERT INTO Account (id, password) VALUES ('$user', '$pass')";
$result = mssql_query($query);
$queryb = "INSERT INTO StrokePoint (id, A_FirstLoginDate, A_LastLoginDate, A_Statue, A_Race, A_Level, A_PayMethod, A_LeftPoint, A_ServerNumber, A_CloseDate, A_TotalStrokePoint, A_LastStrokePoint, A_UsedPoint, A_OpenDate, A_UnlockDate, A_CreateDate, A_LastSaveDate) VALUES ('$user', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1')";
$resultb = mssql_query($queryb);
echo "Account " . $user . " successfully created with password " . $pass .""; }
include('footer.php');
mssql_close();
}
?>
how can i change the script to be compatible with mine i ran the sql insert to and it gives me this
INSERT INTO [test2].[dbo].[member]
([userid]
,[usernick]
,[sex]
,[passwd]
,[registdate]
,[id9you])
VALUES
(<userid, char(12),>
,<usernick, char(20),>
,<sex, bit,>
,<passwd, char(20),>
,<registdate, datetime,>
,<id9you, char(11),>)
//Run the querys if all goes well
function error_cex() {
echo "An account with that name already exists";
include('footer.php');
exit(); }
$queryc = "SELECT id FROM Account WHERE id = '$user'";
$resultc = mssql_query($queryc);
$numc = mssql_num_rows($resultc);
if ($numc > 0) {
error_cex(); }
else {
$query = "INSERT INTO Account (id, password) VALUES ('$user', '$pass')";
$result = mssql_query($query);
$queryb = "INSERT INTO StrokePoint (id, A_FirstLoginDate, A_LastLoginDate, A_Statue, A_Race, A_Level, A_PayMethod, A_LeftPoint, A_ServerNumber, A_CloseDate, A_TotalStrokePoint, A_LastStrokePoint, A_UsedPoint, A_OpenDate, A_UnlockDate, A_CreateDate, A_LastSaveDate) VALUES ('$user', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1')";
$resultb = mssql_query($queryb);
echo "Account " . $user . " successfully created with password " . $pass .""; }
include('footer.php');
mssql_close();
}
?>
how can i change the script to be compatible with mine i ran the sql insert to and it gives me this
INSERT INTO [test2].[dbo].[member]
([userid]
,[usernick]
,[sex]
,[passwd]
,[registdate]
,[id9you])
VALUES
(<userid, char(12),>
,<usernick, char(20),>
,<sex, bit,>
,<passwd, char(20),>
,<registdate, datetime,>
,<id9you, char(11),>)