Jump to content

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?

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.