Jump to content

MySql Update


zackcez

Recommended Posts

I have this:

<?php
$username = "admin";
$password = "msg1028";
$hostname = "localhost";	
$dbh = mysql_connect($hostname, $username, $password) 
or die("Unable to connect to MySQL");
$selected = mysql_select_db("forum",$dbh) 
or die("Could not select first_test");
$jid = $_GET['jid'];
$resultr = mysql_query("UPDATE join SET show = '2' WHERE id='$jid'");
?>

and I get this error:

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 'join SET show = '2' WHERE id='1'' at line 1

Link to comment
https://forums.phpfreaks.com/topic/105681-mysql-update/
Share on other sites

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.