Robert

SQL Error

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

Created: August 28, 2016 at 3:38 am
  • In: Classifieds Theme
  • Started by: Robert
  • 3 members left 15 comments
  • Last reply from: Robert


  • Josh
    August 28, 2016 at 10:29 am

    Hello Robert,
    I think you should open a ticket >>


  • Anonymous
    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
    August 28, 2016 at 1:17 pm

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


  • Anonymous
    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 this may be the problem and you may need to drop to

    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 #8230; and will be used and patched till 2024 🙂

    David


  • Robert
    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
    August 28, 2016 at 1:57 pm

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


  • Anonymous
    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.


  • Anonymous
    August 28, 2016 at 1:59 pm

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


  • Anonymous
    August 28, 2016 at 2:28 pm

    You get my point Robert?


  • Robert
    August 28, 2016 at 2:46 pm

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


  • Josh
    August 28, 2016 at 2:47 pm

    @Robert Avangate Order number is your license key


  • Anonymous
    August 28, 2016 at 2:51 pm

    Josh ? 🙂


  • Anonymous
    August 28, 2016 at 2:52 pm

    Robert pretty sure its a PHP v thing


  • Anonymous
    August 28, 2016 at 2:54 pm

    I was going to start 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)