Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
How do i collect just one type of currency from the users_currency table and can i add it to the template.class
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="nateforever96" data-source="post: 469479" data-attributes="member: 100733"><p>$currencyData = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]users_currency[/ICODE] WHERE [ICODE]user_id[/ICODE] = '".$_SESSION['user']['id']."'"));</p><p> this is far as my logic goes with the pulling i am use to simple and when i have to pull a tables value only at the session user i get confused one person can get me a far way right now the tables are</p><p>Users_Currencys</p><p>values</p><p>Users_Id , Type , Amount</p><p></p><p>credits are type 0 </p><p>diamonds 5</p><p> </p><p></p><p></p><p>P.S. im trying to reconvert this and bring it back</p><p></p><p> if(isset($_POST['BuyRoll'])){</p><p> $userData = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]users[/ICODE] WHERE [ICODE]id[/ICODE] = '".$_SESSION['user']['id']."'"));</p><p> $currencyData = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]users_currency[/ICODE] WHERE [ICODE]user_id[/ICODE] = '".$_SESSION['user']['id']."'"));</p><p> $Purchase = '5000';</p><p> if($userData['credits'] < $Purchase){</p><p> echo "Not Enough Credits</br></br>";</p><p> }else{</p><p> mysql_query("UPDATE [ICODE]users[/ICODE] SET credits = credits - $Purchase WHERE id = '".$_SESSION['user']['id']."'");</p><p> $LotControl = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]LotteryControls[/ICODE]"));</p><p> if ($userData['online'] == 0){</p><p> $testUsers = mysql_query("SELECT * from user_lottery WHERE user_id = '". $_SESSION['user']['id'] ."' LIMIT 1");</p><p> if(mysql_num_rows($testUsers) > 0){</p></blockquote><p></p>
[QUOTE="nateforever96, post: 469479, member: 100733"] $currencyData = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]users_currency[/ICODE] WHERE [ICODE]user_id[/ICODE] = '".$_SESSION['user']['id']."'")); this is far as my logic goes with the pulling i am use to simple and when i have to pull a tables value only at the session user i get confused one person can get me a far way right now the tables are Users_Currencys values Users_Id , Type , Amount credits are type 0 diamonds 5 P.S. im trying to reconvert this and bring it back if(isset($_POST['BuyRoll'])){ $userData = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]users[/ICODE] WHERE [ICODE]id[/ICODE] = '".$_SESSION['user']['id']."'")); $currencyData = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]users_currency[/ICODE] WHERE [ICODE]user_id[/ICODE] = '".$_SESSION['user']['id']."'")); $Purchase = '5000'; if($userData['credits'] < $Purchase){ echo "Not Enough Credits</br></br>"; }else{ mysql_query("UPDATE [ICODE]users[/ICODE] SET credits = credits - $Purchase WHERE id = '".$_SESSION['user']['id']."'"); $LotControl = mysql_fetch_array(mysql_query("SELECT * FROM [ICODE]LotteryControls[/ICODE]")); if ($userData['online'] == 0){ $testUsers = mysql_query("SELECT * from user_lottery WHERE user_id = '". $_SESSION['user']['id'] ."' LIMIT 1"); if(mysql_num_rows($testUsers) > 0){ [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
How do i collect just one type of currency from the users_currency table and can i add it to the template.class
Top