Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FUCKING PHP.

Name: Anonymous 2007-11-06 4:17

Alright /prog/, I'm fucking lost.

My syntax is wrong and I'm just too blind to see where.

What I want this simple lil' PHP script to do is set 2 column values, and for some reason it just won't.

if($_GET['approve']){
$item = $_GET['approve'];
mysql_query("UPDATE $table SET status='PA' num='prefix$item' WHERE id='$item'") or die(mysql_error());
mkdir("../../path/folderprefix$item", 0777);}

Is it because I can't use the WHERE clause, or is it just out of order?

DEBUGGING MODE:

UPDATE table SET status='PA' num='prefix115' WHERE id='115'

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'num='prefix115' WHERE id='115'' at line 1

That's what I get. It's supposed to be doing what I want it to, but it seems to not want to do that.

Name: Anonymous 2007-11-06 4:57

The grammar of a typical update is thus:

update table set column1=value1, column2=value2 where column3=value3

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List