helpchrisplz
asked on
update query
hi am unsure whats wrong with this UPDATE query thanks for helping :
CREATE TABLE IF NOT EXISTS `images` (
`pictureId` int(4) NOT NULL auto_increment,
`memberId` int(11) default NULL,
`imgLarge` varchar(255) default NULL,
`imgSmall` varchar(255) default NULL,
PRIMARY KEY (`pictureId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
$sqlUpdate = "UPDATE `images` SET `imgLarge` = '".$file."', `imgSmall` = '".$save."' WHERE `pictureId` = '".$pictureId."'";
thank you for helping
CREATE TABLE IF NOT EXISTS `images` (
`pictureId` int(4) NOT NULL auto_increment,
`memberId` int(11) default NULL,
`imgLarge` varchar(255) default NULL,
`imgSmall` varchar(255) default NULL,
PRIMARY KEY (`pictureId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
$sqlUpdate = "UPDATE `images` SET `imgLarge` = '".$file."', `imgSmall` = '".$save."' WHERE `pictureId` = '".$pictureId."'";
thank you for helping
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
.. perhaps try to remove the ~ sign :
$sqlUpdate = "UPDATE images SET imgLarge='".$file."', imgSmall='".$save."' WHERE pictureId='".$pictureId."'";
ASKER
mysql_query was missing thx
This is a debugging issue. If the query looks right but fails to execute, you might try to print the query on a console as it is being passed to MySQL to ensure the what you typed is what you wanted (wytiwyw).