| Author |
Message |
< Erlyweb mailing list ~ 42000 You have an error in your SQL syntax; check the manual |
| Guest |
Posted: Fri Nov 07, 2008 11:02 pm |
|
|
|
Guest
|
Hey everyone,
I'm fairly new to ErlyWeb and I've been trying to get a hang of it by
building a quick prototype.
However, every time I attempt to compile the code, I get this odd
error:
mysql_conn:426: fetch <<"describe load">> (id <0.82.0>)
** exception exit: {mysql_result,[],[],0,
<<"#42000You have an error in your
SQL syntax; check the manual that corresponds to your MySQL
serv"...>>}
in function erlydb_mysql:'-get_metadata/1-fun-0-'/3
in call from lists:foldl/3
in call from erlydb:'-code_gen/4-fun-2-'/4
in call from lists:foldl/3
in call from erlydb:'-code_gen/4-fun-3-'/3
in call from lists:foldl/3
in call from erlydb:code_gen/4
in call from erlyweb_compile:compile/2
I created a database called "Whistler" with a table called "load"
I also called erlyDb:Start ->
erlydb:start(mysql, [{hostname, "localhost"}, {username,
"adrianbalij"}, {password, "1"}, {database, "Whistler"}]).
Followd by
erlyweb:compile("/Users/adrian/Documents/Engineering\ Inc/Project\
Whistler/Inception/Prototype/Website/whistler", [{erlydb_driver,
mysql}]).
Any ideas would be helpful. Thanks for your time!
Adrian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Sat Nov 08, 2008 3:58 am |
|
|
|
Guest
|
I noticed something weird while I tried debugging this glitch. As soon
as I renamed the table to "loadz", it compiled! Very weird.
On Nov 7, 6:02 |
|
|
| Back to top |
|
| dmitriid |
Posted: Sat Nov 08, 2008 6:42 pm |
|
|
|
User
Joined: 17 Aug 2006
Posts: 213
|
load might be a reserved word in MySQL. In reality erlydb_mysql shoud
"escape" tabe and field names by surrunding them with backticks
--On November 7, 2008 7:58:37 PM -0800 AdrianB <adrian.balij@gmail.com>
wrote:
>
> I noticed something weird while I tried debugging this glitch. As soon
> as I renamed the table to "loadz", it compiled! Very weird.
>
> On Nov 7, 6:02 pm, AdrianB <adrian.ba...@gmail.com> wrote:
>> Hey everyone,
>>
>> I'm fairly new to ErlyWeb and I've been trying to get a hang of it by
>> building a quick prototype.
>>
>> However, every time I attempt to compile the code, I get this odd
>> error:
>>
>> mysql_conn:426: fetch <<"describe load">> (id <0.82.0>)
>> ** exception exit: {mysql_result,[],[],0,
>> <<"#42000You have an
>> error in your SQL syntax; check the manual that corresponds to your MySQL
>> serv"...>>}
>> in function erlydb_mysql:'-get_metadata/1-fun-0-'/3
>> in call from lists:foldl/3
>> in call from erlydb:'-code_gen/4-fun-2-'/4
>> in call from lists:foldl/3
>> in call from erlydb:'-code_gen/4-fun-3-'/3
>> in call from lists:foldl/3
>> in call from erlydb:code_gen/4
>> in call from erlyweb_compile:compile/2
>>
>> I created a database called "Whistler" with a table called "load"
>>
>> I also called erlyDb:Start ->
>>
>> erlydb:start(mysql, [{hostname, "localhost"}, {username,
>> "adrianbalij"}, {password, "1"}, {database, "Whistler"}]).
>>
>> Followd by
>>
>> erlyweb:compile("/Users/adrian/Documents/Engineering\ Inc/Project\
>> Whistler/Inception/Prototype/Website/whistler", [{erlydb_driver,
>> mysql}]).
>>
>> Any ideas would be helpful. Thanks for your time!
>>
>> Adrian
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|