Simple Invoices logo
    • CommentAuthorgregk
    • CommentTimeNov 14th 2008 edited
     permalink
    Hi,

    I successfully installed SimpleInvoices and have it running. However on my first run I was told I needed to patch the database.

    When I click "update" I get this error:

    Dude, what happened to your query?:

    CREATE TABLE si_sql_patchmanager (sql_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,sql_patch_ref VARCHAR( 50 ) NOT NULL, sql_patch VARCHAR( 255 ) NOT NULL ,sql_release VARCHAR( 25 ) NOT NULL, sql_statement TEXT NOT NULL) ENGINE = MYISAM)
    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 ')' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

    What should I do?

    Thanks!
    ~g
    • CommentAuthorgregk
    • CommentTimeNov 14th 2008
     permalink
    Here are my vitals:

    PHP Version: 5.2.5
    MySQL: 5.0.45
    Apache: 1.3.37 (Unix)
    OS: Linux
    Host: Siteground.com

    Thanks!
    • CommentAuthorjustin
    • CommentTimeNov 18th 2008 edited
     permalink
    Hey GregK,

    what you can do is open index.php and delete the following section

    // Check for any unapplied SQL patches when going home
    if (($module == "options") && ($view == "database_sqlpatches")) {
    include_once('./modules/options/database_sqlpatches.php');
    donePatches();
    } elseif ($file == 'home') {
    include_once('./modules/options/database_sqlpatches.php');
    if (getNumberOfPatches() > 0 ) {
    $view = "database_sqlpatches";
    $module = "options";

    if($action == "run") {
    runPatches();
    } else {
    listPatches();
    }
    $menu = false;
    }
    }


    the above checks if all the patches have been applied - must be something weird happening on your system so that it reports that patches are needed

    let us know how you go

    note to self: add this to list to investigate further

    cheers

    justin
    • CommentAuthorgregk
    • CommentTimeNov 19th 2008
     permalink
    Hi Justin,

    I did as you said and got this error:

    Fatal error: Call to undefined function getnumberofdonepatches() in /home/wingnutb/public_html/simpleinvoices/include/sql_patches.php on line 553

    I then commented out the appropriate section in sql_patches.php. This got the program running.

    I then successfully added a test customer. I then tried to create an invoice and got this error:

    Dude, what happened to your query?:

    INSERT into si_products ( id, description, unit_price, custom_field1, custom_field2, custom_field3, custom_field4, notes, enabled, visible ) VALUES ( NULL, 'test', '', '', '', '', '', '', '0', '0' )
    Unknown column 'visible' in 'field list'Dude, what happened to your query?:

    SELECT * FROM si_tax WHERE tax_id =
    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 '' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    Any ideas what I should do next?

    You can find the installation at: www.wingnutbags.com/simpleinvoices

    Cheers,
    ~g
    • CommentAuthorjustin
    • CommentTimeNov 23rd 2008
     permalink
    first of - cool bags :)

    i suggest creating the database again and make sure you use SimpleInvoices.sql

    if you get those update messages on a new install then theres somethign weird happening

    let us know how you go

    cheers

    justin
    • CommentAuthorgregk
    • CommentTimeNov 24th 2008
     permalink
    It is working! Thanks very much. I can't wait to work with it.

    And thanks for the kind words about our bags. If you play disc golf they are pretty sweet.

    Cheers!
    ~g
    • CommentAuthorjustin
    • CommentTimeNov 24th 2008
     permalink
    great to hear it worked!

    cheers

    justin