Bug found (and solution too)

Help
2006-04-04
2013-04-17
  • Hi, I'm not very aware of how using the tracker to post a bug so I submit it here hoping the devs will read it.

    When I use MyPhpMoney and come to the "book.php" page I get the following error message :
    <quote><i>
    MySQL Error :
    1064(You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OUT) as t2 FROM MPM_op WHERE TEMPID=1 AND TO_DAYS(NOW()) >= TO_DAYS(DATES) AND U' at line 1)
    Database :
    Invalid SQL: SELECT SUM(IMP - OUT) as t2 FROM MPM_op WHERE TEMPID=1 AND TO_DAYS(NOW()) >= TO_DAYS(DATES) AND USERID='114236150612' AND ACCOUNT='114236150612003'
    </i></quote>
    I found out that the reason for this SQL error is the usage of the keyword 'OUT' to fix this issue you have to replace this SQL sentence:
    <quote><i>
    SELECT SUM(IMP - OUT) as t2 FROM MPM_op WHERE TEMPID=1 AND TO_DAYS(NOW()) >= TO_DAYS(DATES) AND USERID='114236150612' AND ACCOUNT='114236150612003'
    </i></quote>
    with
    <quote><i>
    SELECT SUM(`IMP` - `OUT`) as t2 FROM MPM_op WHERE TEMPID=1 AND TO_DAYS(NOW()) >= TO_DAYS(DATES) AND USERID='114236150612' AND ACCOUNT='114236150612003'
    </i></quote>

    Ok, I hope that will help getting this software even greater than it is now :D

     
    • Ok sorry i found out where to post the bugs in the tracker