DreamWeaver CS4-CS5 Creates Syntax Errors
I cannot seem to find any info on this online but my DreamWeaver CS4 and a trial of DreamWeaver CS5 both create PHP and SQL queries that are loaded with syntax errors. I use XAMPP on my computer as I have done for years, and it works fine with phpMyAdmin and Komodo Edit. DreamWeaver has been a nifty app to quickly knock out simple applications in that past, but now I spend too much time manually correcting syntax errors in PHP page queries.
Has anyone there heard of a fix for this? Several other web developers have told me that they entirely abandoned DW CS* series and moved on to other IDE's rather than try to fix the problem.
EXAMPLE:
Here is what it wrote:
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE `mysite` SET about-yn=%s, about-h1=%s, about-p1=%s, about-p2=%s, about-p2-img=%s, about-p3=%s, about-p3-img=%s, about-p4=%s, about-p4-img=%s WHERE siteID=%s",
GetSQLValueString($_POST['aboutyn'], "text"),
GetSQLValueString($_POST['abouth1'], "text"),
GetSQLValueString($_POST['aboutp1'], "text"),
GetSQLValueString($_POST['aboutp2'], "text"),
GetSQLValueString($_POST['aboutp2img'], "int"),
GetSQLValueString($_POST['aboutp3'], "text"),
GetSQLValueString($_POST['aboutp3img'], "int"),
GetSQLValueString($_POST['aboutp4'], "text"),
GetSQLValueString($_POST['aboutp4img'], "int"),
GetSQLValueString($_POST['siteID'], "int"));
Here is what it should have written:
f ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE `mysite` SET `about-yn`=\"%s\", `about-h1`=\"%s\", `about-p1`=\"%s\", `about-p2`=\"%s\", `about-p2-img`=\"%s\", `about-p3`=\"%s\", `about-p3-img`=\"%s\", `about-p4`=\"%s\", `about-p4-img`=\"%s\" WHERE `siteID`=\"%s\"",
GetSQLValueString($_POST['aboutyn'], "text"),
GetSQLValueString($_POST['abouth1'], "text"),
GetSQLValueString($_POST['aboutp1'], "text"),
GetSQLValueString($_POST['aboutp2'], "text"),
GetSQLValueString($_POST['aboutp2img'], "int"),
GetSQLValueString($_POST['aboutp3'], "text"),
GetSQLValueString($_POST['aboutp3img'], "int"),
GetSQLValueString($_POST['aboutp4'], "text"),
GetSQLValueString($_POST['aboutp4img'], "int"),
GetSQLValueString($_POST['siteID'], "int"));
najrellim@gmail.com
