php help

Reply

Join Date: Dec 2007
Posts: 4
Reputation: EmpireZ is an unknown quantity at this point 
Solved Threads: 0
EmpireZ EmpireZ is offline Offline
Newbie Poster

php help

 
0
  #1
Sep 2nd, 2008
On my game , my bank and money is being limited to 2 billion.
Seems like the first 4 numbers (2147) are the same for everyone who has that much,
I tested it out on money too and it's only going up to that number even though I edit db with more money (4 billion).

Anyone know why it's stopping at this particular number ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 771
Reputation: darkagn has a spectacular aura about darkagn has a spectacular aura about darkagn has a spectacular aura about 
Solved Threads: 104
darkagn's Avatar
darkagn darkagn is offline Offline
Master Poster

Re: php help

 
0
  #2
Sep 2nd, 2008
Without more details I can only guess, but I would say that your data type for the amount of money that the player can get is an SQL INT. Am I right? An INT in SQL can only have a maximum value of 2,147,483,647. If that is the case, I would recommend using a BIGINT which will allow your players to have as much as 9,223,372,036,854,775,807!
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 9
Reputation: kashif farooq is an unknown quantity at this point 
Solved Threads: 0
kashif farooq kashif farooq is offline Offline
Newbie Poster

Re: php help

 
0
  #3
Sep 4th, 2008
display record from DB to webpage PAGE WISE PLEASE HELP ME IN:

kashiffarooq_5 @ hotmail . com
  1. <?php
  2. $con=mysql_connect("localhost","root","");
  3.  
  4. mysql_select_db("manzilen");
  5.  
  6. // on the web:
  7.  
  8. /*
  9. $dbh=mysql_connect ("localhost", "manzil_manzil", "hamari123") or die('Cannot connect to the database because: ' . mysql_error());
  10. mysql_select_db ("manzil_manzilen");
  11. */
  12.  
  13.  
  14. $display="select * from feedback order by id desc";
  15.  
  16. $rs=mysql_query($display);
  17.  
  18.  
  19. if (mysql_num_rows($rs)>0)
  20. {
  21. while($row=mysql_fetch_array($rs))
  22. {
  23. ?>
  24. </p>
  25. </p>
  26. <table width = "62%" height="164" border="1" align="center" cellpadding="1" cellspacing="1">
  27. <tr>
  28. <td width="10%" height="23" valign="top" bgcolor="#0099FF" class="style27"><span class="style22"> Id. </span></td>
  29. <td colspan="4" valign="top" class="style27"><div align="justify" class="style29"><span class="style27"><?php echo $row[0];?></span></div></td>
  30. <!-- this table column is for picture -->
  31. <td width="26%" rowspan="9" align="center" valign="middle">
  32. <span class="style29">
  33. <!-- <a href = "<?php echo $row[9];?>"> -->
  34. <img src = "<?php echo $row[9];?>" width="125" height="125" border=0 /> <BR>
  35. <!-- <?php echo $row[1]; ?> -->
  36. </a> </span></td>
  37. </tr>
  38. <tr class="style27">
  39. <td height="23" valign="top" bgcolor="#0099FF" class="style18"><span class="style30"> Name </span></td>
  40. <td colspan="4" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[1];?></span></div></td>
  41. </tr>
  42. <tr class="style27">
  43. <td height="23" valign="top" bgcolor="#0099FF" class="style18"><span class="style30"> Email </span></td>
  44. <td colspan="4" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><a href = "mailto:<?php echo $row[2];?>"><?php echo $row[2];?></a></span></div></td>
  45. </tr>
  46. <tr class="style27"><td height="23" valign="top" bgcolor="#0099FF" class="style18"><span class="style30">Gender </span></td>
  47. <td colspan="4" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[3];?></span></div></td>
  48. <tr class="style27">
  49. <td height="23" valign="top" bgcolor="#0099FF" class="style18"><span class="style30">Hobbies</span></td>
  50. <td width="16%" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[4];?></span></div></td>
  51. <td width="16%" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[5];?></span></div></td>
  52. <td width="15%" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[6];?></span></div></td>
  53. <td width="17%" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[7];?></span></div></td>
  54. </tr>
  55. <tr class="style27">
  56. <td height="23" valign="top" bgcolor="#0099FF" class="style18"><span class="style30"> Age </span></td>
  57. <td colspan="4" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[8];?></span></div></td>
  58. </tr>
  59. <!--
  60. <tr>
  61. <td valign="top" bgcolor="#0099FF"><strong><font size="2"> Picture </strong></td>
  62. <td colspan="4" valign="top"><img src = "<?php echo $row[9];?>" > </td>
  63. </tr>
  64. -->
  65. <tr class="style27">
  66. <td height="23" valign="top" bgcolor="#0099FF" class="style18"><span class="style30"> Comments </span></td>
  67. <td colspan="4" valign="top" class="style18"><div align="justify" class="style29"><span class="style27"><?php echo $row[10];?></span></div></td>
  68. </tr>
  69. <tr>
  70. <td valign="top" bgcolor="#0099FF"><span class="style13"><font size="2"> Date & Time </span></td>
  71. <td colspan="4" valign="top"><div align="justify"><span class="style14"><?php echo $row[11];?></span></div></td>
  72. </tr>
  73.  
  74. </table>
  75. <?php
  76. }
  77. }
  78. else
  79. {
  80. echo "<font color = red size=5> No Records Founded!</font>";
  81. }
  82.  
  83.  
  84.  
  85. //header('location:info.htm');
  86. echo "<br>";
  87. echo "<center><a href = feedback.htm> Form's Page </a></center> <BR>";
  88. echo "<center><a href = index.htm> Main Page </a></center> <BR>";
  89.  
  90. ?>
  91. <BR />
Last edited by cscgal; Sep 4th, 2008 at 3:41 am. Reason: Added code tags
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 561
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: php help

 
0
  #4
Sep 4th, 2008
yeah,just what darkagn has said,change the data type of your db field.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC