1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script Error

Discussion in 'Scripting' started by tmarz, Jun 8, 2017.

  1. tmarz

    tmarz Registered Member

    Joined:
    Jan 13, 2016
    Messages:
    66
    Likes Received:
    7
    My script runs fine for awhile but runs into these errors and the site crashes eventually

    PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/admin/web/web.com/public_html/scrape/import_web.php on line 155 and defined in /home/admin/web/web.com/public_html/wp-includes/wp-db.php on line 1291, referer: http://www.web.com/scrape/import_episode.php?start=237

    PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/admin/web/web.com/public_html/scrape/import_episode.php on line 9 and defined in /home/admin/web/web.com/public_html/wp-includes/wp-db.php on line 1291, referer: web.com/scrape/import_episode.php?start=237

    PHP Warning: Missing argument 2 for wpdb::prepare(), called in /home/admin/web/web.com/public_html/scrape/import_episode.php on line 35 and defined in /home/admin/web/web.com/public_html/wp-includes/wp-db.php on line 1291, referer: http://web.com/scrape/import_episode.php?start=237

    These are the lines the errors speak of

    Line 155
    $query = $wpdb->prepare("UPDATE 1zmarz_animes SET episode_created='1' WHERE id='".$importid."'");

    Line 9
    $query = $wpdb->prepare("SELECT id, anime_name2, wordpress_id FROM 1zmarz_animes WHERE wordpress_created='1' AND episode_created='0' ORDER BY id ASC LIMIT $start,1");

    Line 35
    $query2 = $wpdb->prepare("SELECT * FROM 1tmarz_episodes WHERE animes_id='".$importid."' ORDER BY episode_name3 ASC");

    How do i fix this