• Resolved warrenopus

    (@warrenopus)


    Form Manager Version 1.6.40
    WP version: 3.5.1
    Server: Linux

    On the main ‘forms’ admin page
    e.g
    /wp-admin/admin.php?page=fm-admin-main

    Submission count column shows this error:
    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /wp-content/plugins/wordpress-form-manager/db.php on line 1239

    Last Submission column shows this error:
    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /wp-content/plugins/wordpress-form-manager/db.php on line 1248

    It appears to be inside
    function getSubmissionDataNumRows($formID){
    $dataTable = $this->getDataTableName($formID);
    $q = “SELECT COUNT(*) FROM {$dataTable}“;
    $res = $this->query($q);
    $row = mysql_fetch_row($res);
    mysql_free_result($res);
    return $row[0];
    }

    https://www.ads-software.com/extend/plugins/wordpress-form-manager/

Viewing 1 replies (of 1 total)
  • Thread Starter warrenopus

    (@warrenopus)

    RESOLVED.

    I used WSD security to rename the database table prefixes. So they would not be wp_%tablename%, the wp_ is replaced. All plugins work fine with this but not WordPress Form Manager.

    WordPress Form Manager stores it’s table name inside the database!

    mysql> SELECT data_table FROM wp_fm_forms WHERE ID = ‘1’
    -> ;
    +————–+
    | data_table |
    +————–+
    | wp_fm_data_1 |
    +————–+

    The data_table value is hardset in the DB to wp_fm_data_1
    When you utilize WSD security to alter your table prefix this is what happens, the datatable name is now set to %newprefix%_fm_data_1
    but the table name stored in the DB is still wp_fm_data_1 not %newprefix%_fm_data_1

    Use a mysql update statement
    update %newprefix%_fm_forms set data_table = ‘%newprefix%_fm_data_1’ where ID = ‘1’;

    update %newprefix%_fm_forms set data_table = ‘%newprefix%_fm_data_1’ where ID = ‘2’;

    etc…

Viewing 1 replies (of 1 total)
  • The topic ‘MySQL errors – mysql_fetch_row(): supplied argument is not a valid MySQL result’ is closed to new replies.