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

Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.
The

radio button reamains checked
Hello i'm trying to keep the state off my radio buttons so it shows which ones where clicked after t

Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem: I have below button declaration in markup of the aspx page:

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

PHP / MySQL Associative Multidimensional Array:
Hello.

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

Amend code to allow multiple attachments
Hi

I have a php page that allows the user to browse to a file (image) then sumbit, the confi

The IE or FF detector
Hello Friends,

Problem of today ( we seek for php help ) as following ,

we know all th

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

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