ubi_ct83 -3 Junior Poster

hi guys,

i have an error to update database because of variable.

this is my code
UPDATE `payment` SET `check`=1 AND 'amount'=$amountpaid WHERE `check`=0 AND `userid`=$uid


$amountpaid id the amount of bill that user paid and $uid is user id.anyone knows how to use variable in sql?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.