problems with php variables in mysql query


Posted on 16th Feb 2014 07:03 pm by admin

i can't seem to get the following query to work.

select $q1c from $vote_rate where id = $recent_record LIMIT 0,1 ;

Did you know?Explore Trending and Topic pages for more stories like this.
this method did not work either
select .$q1c. from .$vote_rare. where id = .$recent_record. LIMIT 0,1 ;

i did get

$q_o = " AND id=".$rand." ORDER BY id asC LIMIT 1";
"SELECT ".$answer2." FROM vote_rare WHERE".$q_o;

to run, i.e. not crash my script

but then i don't get any result from $answer_db = $row['$answer2'];

any ideas?
No comments posted yet

Your Answer:

Login to answer
171 Like 12 Dislike
Previous forums Next forums
Other forums

Dynamic Array using glob?
Is there an easier way to do this?

I am trying to get create a dyamic array based on files wi

check_changed_data - I can't get data from the called method event
I use check_changed_data to trigger my event method.

The method delivers er_changed_data.

Warning: session_start() headers already sent error - Driving me Nuts!
I am trying my sister in laws site and I keep getting an error with my coding. I am more of a design

Getting the full city list from maxminds geoip database
I am suprised I can't find any references to this.

I have maxminds geoip lite installed and i

Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...

Code: $define_li

Parse error: syntax error, unexpected T_ELSEIF in /home/......html/item.php on l
I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

generate seo frienly url from a text like wordpress
Convert: "åäö" to "aao", "space" to "-", "!?&q

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash