1

How am i supposed to insert a word into a blank row?

$sql = "INSERT INTO ue-userfile WHERE id='$imageid' AND userid='$userid' (`albumname`) VALUES('$newalbum')";

?

$sql  = "
            INSERT INTO `ue-userfile` (
              ``,  ``, ``, ``, ``, ``,``,`albumname`
            )
            VALUES ('{$albumname}')";

?
God damn annoying to not find any solution on how to insert or update a blank row...

Votes + Comments
You 've solve it yourself, the second option will work.
3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by Sorcher
0
if(isset($_POST['albumname']) && $_POST['imageid']){

	$newalbum = $_POST['albumname'];
	$newalbum = htmlentities($newalbum);
	
	$imageid = $_POST['imageid'];

	$imageid = htmlentities($imageid);
	$sql5 = "UPDATE ue-userfile SET albumname = '$newalbum' WHERE id = '$imageid'";
	$result5 = mysql_query($sql5);}

i've checked my connection to the database, also the outputs of the variables, its all fine. but it wont change the current album name to the new one $newalbum

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.