SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 60 of 60
  1. #51

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Quaint
    Seriously Dr Zoid, I have deep respect for the way you handle these...

    Way to go! Props for the community also I'd say...
    Thank you, I am trying my best

  2. #52
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Quaint,

    I agree with you %.

    drzoid has been great.

    Thank you.

  3. #53

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just in case you overlooked it, there is in actual response from me .... my last posting just created a new page

  4. #54
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello drzoid,

    tblAcc contains the payemts made by the users. It has the ff fields:
    username, password, bankbranch, payee, voucherno, date, amount.

    I tried codes this way:

    $result=mysql_query("SELECT SUM(amount) FROM tblAcc WHERE
    username='$username' and password='$password'");

    and

    mysql_query("INSERT INTO tblAcc (username, password, amount) VALUES ('$username', '$password', -$amount)");

    I want the username and the password to be true.

    The script ran, but there was no deduction.

    Thanks.

  5. #55
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello drzoid,

    I have a page where users can check their account balance. Is it possible to display transactions along this line?

    Code:
    Debit Credit  Balance
            10000 10000
    1500           8500
    1000           7500
            2000   9500
    Debit would stand for the purchases (in tblOrder), while Credit would stand for Payments (in tblAcc).

    Thank you.

  6. #56

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does your tblAcc table have a password column at all?

  7. #57
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello drzoid,

    Yes, the tblAcc table has a password column.

  8. #58

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dont get me wrong, but I seriously think you should rewrite certain parts of your code and system design. Why do you need the username and password distributed over several places? You should have centralised this kind of data in one table and only reference to it from other tables.

  9. #59
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello drzoid,

    We had power failure the last time.

    Thanks for your advice. I understand what you mean.

    I would surely redo my design. Thanks.

    Fredrick Ughimi.

  10. #60
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello drzoid,

    The table tblAcc is only used by the Administrator to add members payments. I think it be nice to add fields like username and password to go along with the rest of the fields in order for each record to be uniquely identified. What do you think?

    I am thinking of creating another table (e.g. tblStatus) where results from our query would be inserted and it is tblStatus that one would use to check the account balance of the member.

    e.g.
    mysql_query("INSERT INTO tblStatus (password, amount) VALUES ('$password', -$amount)");

    Any suggestion would greatly be appreciated.

    Thank you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •