View Single Post
  #3  
Old 10-09-2009, 01:59 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
It's not horrible, but you definitely need to use a more efficient SELECT statement, something like:

PHP Code:
temp.req requestSQL("SELECT * FROM bank WHERE account = '" player.account "'"true);

if (
req.rows.size() <= 0) {
  return 
printf("Sorry, you haven't registered a bank account!");
}

temp.balance req.rows[0][1];

printf("My balance is $%d"balance); 
__________________
Reply With Quote