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

BackButton Behaviour in AJAX
I have an ASPX Page AJAX Enabled!The page has a gridView and a DDL for filtering on it. The Gridview

PHP / MySQL Associative Multidimensional Array:
Hello.

I have data in a MySQL Table that adheres to the below: (note, no index, could add if

Page not Loading After Test
Hey All

It seemed that an inlcude statement wasn't working for some reason, so I tried a more

Echo-ing MySQL content and Keep Formatting?
I have data in my MySQL such as:

QuoteBlah blah

Blah blah

etc
but when i ech

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

Need help with simple code, back and forward buttons.
Basically, I have a set of pages in a folder, which have the title somephrasehere_09.php, somephrase

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

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