• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Guide] Add Cash Points in Up6

Status
Not open for further replies.
Newbie Spellweaver
Joined
May 1, 2006
Messages
64
Reaction score
3
USE [BillCruxRF]
INSERT INTO [BillCruxRF].[dbo].[tblUser] (userId,userPwd) VALUES ('Account','Password')
INSERT INTO tblUserInfo (userId,userPwd,cashBalance) VALUES ('Account','Password','cash')

:thumbup1:

Password = Password account player
Account = account Player
Cash = total point he have


Sorry for the Bad English :eek:tt1:
 
Initiate Mage
Joined
Oct 17, 2008
Messages
2
Reaction score
0
Re: Add Cash Points in Up6

USE [BillCruxRF]
INSERT INTO [BillCruxRF].[dbo].[tblUser] (userId,userPwd) VALUES ('Account','Password')
INSERT INTO tblUserInfo (userId,userPwd,cashBalance) VALUES ('Account','Password','cash')

:thumbup1:

Password = Password account player
Account = account Player
Cash = total point he have


Sorry for the Bad English :eek:tt1:

Sorry sirr. it doesn't work. i got his error.
(1 row(s) affected)
Msg 515, Level 16, State 2, Line 3
Cannot insert the value NULL into column 'userNumber', table 'BillCruxRf.dbo.tblUserInfo'; column does not allow nulls. INSERT fails.
The statement has been terminated.


can you help to fix this problem.? thank you.
 
Newbie Spellweaver
Joined
Jan 26, 2007
Messages
49
Reaction score
1
Re: Add Cash Points in Up6

How do you just make the cash shop use gold instead of the cash because its easy to remove items and change prices.
 
Newbie Spellweaver
Joined
Apr 15, 2007
Messages
78
Reaction score
0
Re: Add Cash Points in Up6

Soo.. userNumber - is it account serial? Or how should we add cash?
 
Newbie Spellweaver
Joined
Oct 15, 2008
Messages
32
Reaction score
2
Re: Add Cash Points in Up6

I modified this slighty to get it to work as soon as someone makes an account:

mssql_query("INSERT INTO BillCruxRF.dbo.tblUser (userId,userPwd) VALUES ('$login','$pw')");
$sql = "SELECT userId FROM BillCruxRF.dbo.tblUserInfo;";//execute the SQL query and return records to find insertID
$result = mssql_query($sql) or die("MS-Query Error in select-query");
$max = (mssql_num_rows($result)+1);
mssql_query ("INSERT INTO BillCruxRF.dbo.tblUserInfo (userId,userPwd,userNumber,cashBalance,gameServiceId) VALUES ('$login','$pw','$max','2000000000','6')");

Obviously to have 2bil cash points :p But there you are, it works everytime!
 
Newbie Spellweaver
Joined
Apr 15, 2007
Messages
78
Reaction score
0
Re: Add Cash Points in Up6

Yup, but you missed one thing -
Code:
$sql = "SELECT userId FROM BillCruxRF.dbo.tblUserInfo;";//execute the SQL query and return records to find insertID
We need to add data to tblUserInfo first, before we get data from it :)
 
Newbie Spellweaver
Joined
Oct 15, 2008
Messages
32
Reaction score
2
Re: Add Cash Points in Up6

We aren't getting data from that line? the $sql line selects the column, then $result executes the query, then $max adds one record on to how many rows came back from $sql. No data needed, just a line to get to the right row.

Then we insert the data in the correct blank row, and it works like a charm, try it and see :D
 
Newbie Spellweaver
Joined
Apr 15, 2007
Messages
78
Reaction score
0
Re: Add Cash Points in Up6

Wah
mssql_num_rows increases by 1 anyway) sorry, my bad.
P.S. Thanks for share
 
Newbie Spellweaver
Joined
Oct 15, 2008
Messages
32
Reaction score
2
Re: Add Cash Points in Up6

no problem, i'm new to sql, just a bit of code I put together, might be long but it works :D
 
Newbie Spellweaver
Joined
Dec 3, 2004
Messages
13
Reaction score
0
Warning: mssql_query() [function.mssql-query]: message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblUser_tblGameService". The conflict occurred in database "BillCruxRF", table "dbo.tblGameService", column 'gameServiceId'. (severity 16) in W:\www\register.php on line 178

Warning: mssql_query() [function.mssql-query]: Query failed in W:\www\register.php on line 178

Warning: mssql_query() [function.mssql-query]: message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblUserInfo_tblUser". The conflict occurred in database "BillCruxRF", table "dbo.tblUser", column 'userNumber'. (severity 16) in W:\www\register.php on line 182

Warning: mssql_query() [function.mssql-query]: Query failed in W:\www\register.php on line 182

If you have to ask. Php for download would help.

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblUserInfo_tblUser". The conflict occurred in database "BillCruxRF", table "dbo.tblUser", column 'userNumber'. (severity 16) in W:\www\register.php on line 182

Warning: mssql_query() [function.mssql-query]: Query failed in W:\www\register.php on line 182
 
Last edited by a moderator:
Newbie Spellweaver
Joined
Oct 12, 2008
Messages
15
Reaction score
0
Re: Add Cash Points in Up6

all of SQL query doesnt work lolx. is that for up6 which release? i though it will the same but not work at UP6 ragezone release
 
Status
Not open for further replies.
Back
Top