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 ;

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

php include email form with attachment
I have had no luck with finding a email form all over the Internet for various reasons. Some insecur

php + mysql count consecutive data
I have a database of values and I want to work out how to display them if the values match a consecu

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

listing help
Hi,

at first, great new design!!! I like it,

i got a problem,

I want to list so

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

Display Database
I need to create a shopping cart. I found this code online: http://conceptlogic.com/jcart/
Unfort

License Issue - service type user
Hi,

I would like to understand the following issue regarding sap license.
I wish to

Update not working ... please help
Hi,

I am trying to update a row using an edit form by passing id of the row .. but it is not

whats wrong with my code please help!!!
this is the error


Warning: mysql_close(): supplied argument is not a valid MySQL-Link res

DOMDocument
Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a

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