Plugin Directory

Changeset 1836027


Ignore:
Timestamp:
03/08/2018 08:19:43 AM (8 years ago)
Author:
cina
Message:

update WordPress database queries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • odlinks/trunk/odl_posts.php

    r1034341 r1836027  
    149149      }
    150150      if ($makepost==true){
    151         mysql_query("INSERT INTO {$table_prefix}odnew_links (n_url, n_title, n_description, n_email, n_category) VALUES ('$url', '$title', '$description', '$email', $category)");
     151        $sql = "INSERT INTO {$table_prefix}odnew_links (n_url, n_title, n_description, n_email, n_category) VALUES ('$url', '$title', '$description', '$email', $category)";
     152        $wpdb->query($wpdb->prepare($sql));
    152153        $msg = $odl_lang['ODL_SUBMITTED'] . "<P>";
    153154        $out=_odl_email_notifications($url, $title, $description, $email, $category);
     
    339340      if ($makepost==true){
    340341        $sql = "UPDATE {$table_prefix}odlinks SET l_url='$url',l_title='$title',l_description='$description',l_author_mail='$email',l_c_id=".$category." WHERE l_id=".$id;
    341         mysql_query($sql);
     342        $wpdb->query($wpdb->prepare($sql));
    342343
    343344        $msg = $odl_lang['ODL_SUBMITTED'] . "<P>";
Note: See TracChangeset for help on using the changeset viewer.