SQL Error


  • Robert
    Newbie 49 points
    August 28, 2016 at 3:38 am

    I get an error when going to;

    Theme setup>Listing Packages>Statistics
    Choosing ‘Transfer Listings’ ‘Everything Else’>’Custom’

    Warning: mysqli_query() expects parameter 1 to be mysqli, string given in /REDACTED/themes/CT/framework/admin/_5.php on line 52

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /REDACTED/themes/CT/framework/admin/_5.php on line 53

    if(isset($_POST[‘TransferFormListings’]) && is_numeric($_POST[‘from’]) && is_numeric($_POST[‘to’])){

    if($_POST[‘from’] == “-2”){

    $SQL = “SELECT “.$wpdb->prefix.”posts.ID, mt2.meta_value FROM “.$wpdb->prefix.”posts
    LEFT JOIN “.$wpdb->prefix.”postmeta AS mt2 ON (“.$wpdb->prefix.”posts.ID = mt2.post_id AND mt2.meta_key = ‘packageID’)
    WHERE “.$wpdb->prefix.”posts.post_type = ‘”.THEME_TAXONOMY.”_type’
    AND ( “.$wpdb->prefix.”posts.post_status = ‘draft’ OR “.$wpdb->prefix.”posts.post_status = ‘publish’ )
    AND mt2.meta_key IS NULL
    GROUP BY “.$wpdb->prefix.”posts.ID”;
    LINE 52 $result = mysql_query($SQL, $wpdb->dbh);
    LINE 53 if (mysql_num_rows($result) > 0) {
    while ($val = mysql_fetch_object($result)){
    update_post_meta($val->ID,’packageID’,$_POST[‘to’]);
    }
    }

    Wondering if this is a bug


  • Josh
    Super Guru 13,875 points
    August 28, 2016 at 10:29 am

    Hello Robert,
    I think you should open a ticket >>https://s.premiumpress.com/index.php?/Tickets/Submit

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 12:23 pm

    Robert can you post what PHP and MySQL versions your using.

    Ask your hoster if you do not know how to find that info.

    David
    DediClub


  • Robert
    Newbie 49 points
    August 28, 2016 at 1:17 pm

    Hi Dave,
    I’m my hoster 😀 Running 5.6 with extensions mysql and mysqli , MySQL server 5.6. I would open a ticket but its asking for some Avangate order ID and i dont know where to find that

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 1:53 pm

    They seem to be having avangate problems at the mo.

    Can you please verify your PHP -v if 5.6 this may be the problem and you may need to drop to 5.4

    PHP versions and hosting upgrades and requirements are causing problems with software devs who have problems keeping up to date. Forget PHP 7 for now.

    With this in thought all new servers I setup at the moment I use Centos7 which uses PHP 5.4… and will be used and patched till 2024 🙂

    David


  • Robert
    Newbie 49 points
    August 28, 2016 at 1:55 pm

    I messed around with some php settings and i get the message

    “Listing Transfered Successfully” but they haven’t been changed. Still recommend i open a ticket?


  • Robert
    Newbie 49 points
    August 28, 2016 at 1:57 pm

    PHP 5.4 should not be used anymore as support has stopped. Get with the times man 😀

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 1:58 pm

    Still patched. ( security )

    If it’s not broken why fix it?

    It’s the software devs that need to get with it.

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 1:59 pm

    Mark needs to clarify what PHP versions his script will work with.

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 2:28 pm

    You get my point Robert?


  • Robert
    Newbie 49 points
    August 28, 2016 at 2:46 pm

    Aye aye captain birds eye, i’ll wait for the infamous Mark


  • Josh
    Super Guru 13,875 points
    August 28, 2016 at 2:47 pm

    @Robert Avangate Order number is your license key

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 2:51 pm

    Josh ? 🙂

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 2:52 pm

    Robert pretty sure its a PHP v thing

  • Dave Harris
    Dave Harris
    Super Guru 1,383 points
    August 28, 2016 at 2:54 pm

    I was going to start premiumpresshosting.com but mark was not willing.

    Nearsightedness lol.

    I love marks software but he needs to keep up.

Viewing 15 posts - 1 through 15 (of 16 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes