close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

More DataAssist Errors Locally

Thread began 8/04/2009 8:11 pm by reneas.email303886 | Last modified 8/06/2009 5:16 pm by Jason Byrnes | 2746 views | 9 replies |

reneas.email303886

More DataAssist Errors Locally

Here is the error I receive after attempting to post a record to my db using this page locally:

resume_Insert.php

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 'References FROM resume WHERE ID = -1 OR ( -1= -1 AND ID= 3)' at line 1

but it adds the record just doesn't show me resume_Detail.php ...I just get the error listed above. Why the error and how do I correct it?

Renee'

Sign in to reply to this post

Jason ByrnesWebAssist

The error is occurring because one of the columns in your table is named using the MySQL Reserved Word "references".

There are some words that should not be used when naming Columns, tables or other objects in you database because they are reserved as function calls. A full list of reserved words can be found here:
reserved-words.html

Sign in to reply to this post

reneas.email303886

Error Still Exists?

Jason:

Okay...I renamed the Column in my db to Personal References and it still generates same error. Going to call in Personal Recommendations or something other than references. Fingers crossed that it works.

R

Nope that did not work either. Renamed my column Personal Referrals and that still generated the error?

R

Sign in to reply to this post

Jason ByrnesWebAssist

Database column names should not contain a space.

Try naming the column "PersonalReferrals" instead.


After changing the name, you will need to delete the pages created by the DataAssist wizard and recreate them.

Sign in to reply to this post

reneas.email303886

Error Still Exists?

Jason:

Okay none of my columns have spaces and I am not using the word references? Still getting the error:( I took a screenshot of my table for your review but not sure where to send or attach it in the forum.

Renea

Sign in to reply to this post

reneas.email303886

Still Does Not Work After Column Renamed, Etc.

Originally Said By: Jason Byrnes
  Database column names should not contain a space.

Try naming the column "PersonalReferrals" instead.


After changing the name, you will need to delete the pages created by the DataAssist wizard and recreate them.  



Jason:

I renamed the column to PersonalReferrals and it still does not work! Really getting frustrated. The resume_Insert.php page adds a record to the db. Currently there are 10 records;however, when resume_Insert.php attempts to redirect to resume_Detail.php that is when the error occurs. Appreciate anyone's help on getting this error resolved. Thanks!

Renee'

Jason:
Okay it seems to be only the resume_Detail.php page, as the resume_Results.php works and when I update a record from that page, which loads the resume_Update.php page with record I selected it updates the record just fine. The resume_Delete.php page works fine as well. So the only page that seems to be generating the MySQL error is the resume_Detail.php page...Hope this provides some insight so I can get this issue resolved today. Thanks!

Renee'

Support:
Okay folks thru problem solving I compared the code from both the resume_Update.php and resume_Detail.php pages. The detail page was generating the MySQL error and determined that this bit of code created by DataAssist was causing the problem, see code below:

?>
<?php
if (!session_id()) session_start();

I removed that code and now I am able to view the details of each record in my database. This was very frustrating, as I purchased DataAssist to help me develop applications for my clients quickly without a huge learning curve as advertised on your site and I have to say that bugs like this in your code cost me over day in development time. I would like an explanation. Thanks!

Renee'

Sign in to reply to this post

Jason ByrnesWebAssist

The code:
?>
<?php
if (!session_id()) session_start();


is not a bug.


It is in place to work around a problem in PHP where the session contents are not available on page load, it should not cause a MySQL Error.

Perhaps it would help us debug the problem if you could provide the exact text of the Error, I dont believe it would have been the same as the origianl error you reported if you had renamed the column.

Along with the error, it would help if you could compress a copy of the resume_Detail.php page before it was changed into a zip file and attach it to your replay so we could the code generating the error.

Sign in to reply to this post

reneas.email303886

Still Problem w/code in tact

Originally Said By: Jason Byrnes
  The code:
?>
<?php
if (!session_id()) session_start();


is not a bug.


It is in place to work around a problem in PHP where the session contents are not available on page load, it should not cause a MySQL Error.

Perhaps it would help us debug the problem if you could provide the exact text of the Error, I dont believe it would have been the same as the origianl error you reported if you had renamed the column.

Along with the error, it would help if you could compress a copy of the resume_Detail.php page before it was changed into a zip file and attach it to your replay so we could the code generating the error.  



Jason:

In despair I resorted to rebuilding the table and the pages. Now I can insert records via resume_Insert.php and see them via resume_Results.php; however, I still receive an error on the detail page resume_Detail.php like so:

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 'References FROM resume WHERE ID = -1 OR ( -1= -1 AND ID= 5)' at line 1

I have attached a copy of the resume_Detail.php page in zip format for your review...Pls Jason I have already lost 2 days on this project because I cannot get the application to work.

Best,
Renee'

Attached Files
resume_Detail.zip
Sign in to reply to this post

Jason ByrnesWebAssist

it is not possible for the page you sent to generate to generate that error.

I have started a support ticket for you so we can look into the problem, please respond by logging into your support history at:
supporthistory.php?

Sign in to reply to this post

Jason ByrnesWebAssist

In debugging the problem, we noticed that the URL being used:
resume_Insert.php

did not match the location of the pages:
c:\wamp\www\mudcheck


When we changed the URL to match the location of the files:
resume_Insert.php

The page functioned correctly.


In the Site Definition, we saw that the Local Files where being created at:
c:\wamp\www\mudcheck


but the site definition was set to:
c:\wamp\www\

and the URL prefix was set to:
localhost/


We changed those to:
c:\wamp\www\mudcheck

and:
mudcheck/

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...