Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

DreamWeaver CS4-CS5 Creates Syntax Errors

Community Beginner ,
Mar 15, 2011 Mar 15, 2011

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

TOPICS
Server side applications
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 15, 2011 Mar 15, 2011

Dreamweaver will not produce such a mess when using column names which comply with the MySQL Naming Conventions and don´t contain (often quite problematic) hyphen characters.

That said, you´ll be on the safe side when renaming your columns by using underscores instead, example:

about_p3_img

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.

Dreamweaver is certainly not a "perfect" PHP development IDE, but other IDEs (I use Komodo or Aptana at times and like them a lot...) aren´t perfect either. This may seem strange, but IMO Dreamweaver did do the - sort of - right thing by not letting the user get away with using such problematic characters, and that´s what those other IDEs I work with regretfully don´t pay attention to.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2011 Mar 15, 2011

Hi Gunther,

Thank you very much for your prompt reply and I sincerely appreciate your

advice on MySQL Naming Conventions. I will certainly employ that technique

right away and report back to you and the Forum on my results.

Very Truly Yours,

Jan Miller, IWA

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 20, 2011 Mar 20, 2011

Hi Gunther,

I just wanted to thank you very much for the tip on proper MySQL naming

conventions. That solved my issue.

Please let me know if you have a blog that I can follow via RSS.

Very Truly Yours,

Jan Miller

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 20, 2011 Mar 20, 2011

Hi Jan,

thanks for your report, much appreciated.

Please let me know if you have a blog that I can follow via RSS.

I don´t have a blog yet..The only thing I could offer is a collection of Dreamweaver tutorials on my own website -- but they are written in German, so I guess this will be hardly of relevance for you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 20, 2011 Mar 20, 2011

No Problem at all for me to translate them, Gunther, if you could provide a

link to them !

And thank you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 20, 2011 Mar 20, 2011

Jugdish wrote:

No Problem at all for me to translate them, Gunther, if you could provide a 

link to them !

Wow, if you manage to get all my verbose stuff translated, you´ll be a true hero !

Here´s one which is titled Dreamweavers Navigationsleiste für Datensatzgruppen and - in a nutshell - demonstrates how to modify the default PHP Recordset Navigation code in order to automatically generate user-definable "Friendly URLs" while navigating the pages.

Have fun !

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 20, 2011 Mar 20, 2011
LATEST

Thank you very much, Gunter !

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines