PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
satimis
Forum Newbie
Posts: 3 Joined: Fri Nov 15, 2013 8:12 pm
Post
by satimis » Fri Nov 15, 2013 8:45 pm
Hi all,
Warning:
Code: Select all
Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/88/10579588/html/blog/wp-content/plugins/top-position-yahoo-finance/top-position-yahoo-finance.php on line 150 and defined in /home/content/88/10579588/html/blog/wp-includes/wp-db.php on line 992
"top-position-yahoo-finance.php"
Code: Select all
Line 150:
$credits = $wpdb->get_var($wpdb->prepare("SELECT tpyf_symbol FROM " . $table_name . " WHERE tpyf_category='credits';"));
Please help how to change this line? Thanks
Rgds
satimis
Celauran
Moderator
Posts: 6427 Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada
Post
by Celauran » Fri Nov 15, 2013 8:57 pm
satimis
Forum Newbie
Posts: 3 Joined: Fri Nov 15, 2013 8:12 pm
Post
by satimis » Fri Nov 15, 2013 10:23 pm
@ Celauran
Hi,
Thanks
Fixed as follow; (being an user)
/blog/wp-config.php
set:
line 91 @ini_set('display_errors', 0);
I'm interested learning more on coding. Can you help?
satimis
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Fri Nov 15, 2013 11:59 pm
satimis wrote: Fixed as follow; (being an user)
/blog/wp-config.php
set:
line 91 @ini_set('display_errors', 0);
No. That is wrong. Do not do that. You are not fixing anything - rather, you're making it worse.
Celauran posted a link to a page that not only explains what the problem is but tells you what you should do to fix it. Do what it says.
satimis
Forum Newbie
Posts: 3 Joined: Fri Nov 15, 2013 8:12 pm
Post
by satimis » Sat Nov 16, 2013 1:34 am
@ requinix,
Sorry, I'm NOT a programmer, having little knowledge on PHP.
Performed following steps:
On /blog/wp-config.php delete
change Line 150 as:
Code: Select all
$credits = $wpdb->get_var($wpdb->prepare("SELECT tpyf_symbol FROM table WHERE id = %d", $id . $table_name . " WHERE tpyf_category='credits';"));
The warning gone. Did I make the change correct? Thanks
satimis