Jump to content

David Varen

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by David Varen

  1. you don't understand what I'm asking. please see the attached file and maybe you will understand. bank.zip
  2. how do i match the userid field from users to mony_transfer?
  3. I need to do the action "SELECT transferid,SUM(despoit-transferAmount) AS money from money_transfer" WHERE userid=$_SESSION[userid]. the userid is in the users table. how do I combined the two tables so the action will work?
  4. how this mysql supposed to look like? $mysqli = new mysqli("localhost","root",'',"bank"); if ($mysqli -> connect_errno) { echo "Failed to connect to MySQL: " . $mysqli -> connect_error; exit(); } $sql ="SELECT userid FROM users WHERE userid=$_SESSION[userid] UNION SELECT SUM(despoit-transferAmount) AS money from money_transfer"; if ($result = $mysqli -> query($sql)) { while ($obj = $result -> fetch_assoc()) { printf($obj->money."$"); } $result -> free_result(); } $mysqli -> close();
  5. David Varen

    Help me please

    Hi, I have users table with userid column and money_transfer table which all the financial operations are in it. how can I make that every financial operation which I make in money_transfer table will be connected to every user separately?
  6. David Varen

    Help me please

    Hi, I have users table with userid column and money_transfer table which all the financial operations are in it. how can I make that every financial operation which I make in money_transfer table will be connected to every user separately?
×
×
  • Create New...