Jump to content

Having problems using variables in my queries


ghosttr

Recommended Posts

I am having problems using variables in my my sql queries, and i dont know what im doing wrong.

 

This works

//Database Connection
$query = "UPDATE INTO TABLE <table> WHERE id='102441019' SET color ='FFFF00'";

 

But the same thing using a variable does not ??? ???

//Database Connection
$1="FFFF00";
$query = "UPDATE INTO TABLE <table> WHERE id='102441019' SET color ='$1'";

 

 

ok i got that working ;D

 

But that just lead to other problems  :'(

 

I have a list of names that i get from the database in the first column

In the second column i have text displayed as a color, also from the db.

The form lets you select a different color and change it, and it refers to the name.

 

Is there a way to specify the name in the form?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.