Edit and Delete using MySQL problem

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Edit and Delete using MySQL problem

Arief Bayu Purwanto
Hi Guys, I have some question on update and delete a record.
I want to create an app that record all my friends.
I've manage on add and find data, but when I create a routine to edit a record,
It's return a error telling me that the query is incorrect.
But when I execute the query using mysql CLI it word fine.

I'm using a sample edit routin from John's book at page 334.
I atach my project for you guys to check it.

TIA
BTW : good work john, it's a GREAT book!!!.

--
-- Yahoo!ID : ar1ef_310
-- http://www.silentstudio.net
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Edit and Delete using MySQL problem

Arief Bayu Purwanto
2005/10/14, Arief Bayu Purwanto <[hidden email]>:
Hi Guys, I have some question on update and delete a record.
I want to create an app that record all my friends.
I've manage on add and find data, but when I create a routine to edit a record,
It's return a error telling me that the query is incorrect.
But when I execute the query using mysql CLI it word fine.

I'm using a sample edit routin from John's book at page 334.
I atach my project for you guys to check it.

TIA
BTW : good work john, it's a GREAT book!!!.

--
-- Yahoo!ID : ar1ef_310
-- <a href="http://www.silentstudio.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.silentstudio.net

Ups, forgot the attached project :(

--
-- Yahoo!ID : ar1ef_310
-- http://www.silentstudio.net

DaftarTeman.tar.gz (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Edit and Delete using MySQL problem

Benoît Minisini
On Friday 14 October 2005 11:01, Arief Bayu Purwanto wrote:

> 2005/10/14, Arief Bayu Purwanto <[hidden email]>:
> > Hi Guys, I have some question on update and delete a record.
> > I want to create an app that record all my friends.
> > I've manage on add and find data, but when I create a routine to edit a
> > record,
> > It's return a error telling me that the query is incorrect.
> > But when I execute the query using mysql CLI it word fine.
> >
> > I'm using a sample edit routin from John's book at page 334.
> > I atach my project for you guys to check it.
> >
> > TIA
> > BTW : good work john, it's a GREAT book!!!.
> >
> > --
> > -- Yahoo!ID : ar1ef_310
> > -- http://www.silentstudio.net
>
> Ups, forgot the attached project :(
>
> --
> -- Yahoo!ID : ar1ef_310
> -- http://www.silentstudio.net

I looked in the book, and effectively, the example is false!

DB.Find(x, y, ...) or DB.Edit(x, y, ...) generates the following request:
"SELECT * FROM x WHERE y".

In other words, y is a WHERE clause (as said in the wiki).

You can see what is sent to the database server by setting DB.Debug = TRUE.

Regards,

--
Benoit Minisini



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Edit and Delete using MySQL problem

John Rittinghouse
In reply to this post by Arief Bayu Purwanto
My apologies for the error in the book.  It is one of the few places
where I was demonstrating syntax and did not actually run the code
first.  I will correct the book, of course, and ensure the download site
has a corrected copy ...in the interim, I am collecting all of the
feedback and suggestions to make the changes / corrections where
possible.


regards,
jr
 

From: Arief Bayu Purwanto <ariefbayu@gm...>
 Edit and Delete using MySQL problem  
2005-10-14 01:48

 
 
 
 Hi Guys, I have some question on update and delete a record.
 I want to create an app that record all my friends.
 I've manage on add and find data, but when I create a routine to edit a
 record,
 It's return a error telling me that the query is incorrect.
 But when I execute the query using mysql CLI it word fine.
 
 I'm using a sample edit routin from John's book at page 334.
 I atach my project for you guys to check it.
 
 TIA
 BTW : good work john, it's a GREAT book!!!.
 
 --
 -- Yahoo!ID : ar1ef_310
 -- http://www.silentstudio.net
 

From: Arief Bayu Purwanto <ariefbayu@gm...>
 Re: Edit and Delete using MySQL problem  
2005-10-14 02:01

 
 
 
 
 
 
 2005/10/14, Arief Bayu Purwanto <ariefbayu@gm...>:
 >
 > Hi Guys, I have some question on update and delete a record.
 > I want to create an app that record all my friends.
 > I've manage on add and find data, but when I create a routine to edit
a
 > record,
 > It's return a error telling me that the query is incorrect.
 > But when I execute the query using mysql CLI it word fine.
 >
 > I'm using a sample edit routin from John's book at page 334.
 > I atach my project for you guys to check it.
 >
 > TIA
 > BTW : good work john, it's a GREAT book!!!.
 >
 > --
 > -- Yahoo!ID : ar1ef_310
 > -- http://www.silentstudio.net
 
 
 Ups, forgot the attached project :(
 
 --
 -- Yahoo!ID : ar1ef_310
 -- http://www.silentstudio.net
 

From: Benoit Minisini <gambas@us...>
 Re: Re: Edit and Delete using MySQL problem  
2005-10-14 04:39

 On Friday 14 October 2005 11:01, Arief Bayu Purwanto wrote:
 > 2005/10/14, Arief Bayu Purwanto <ariefbayu@gm...>:
 > > Hi Guys, I have some question on update and delete a record.
 > > I want to create an app that record all my friends.
 > > I've manage on add and find data, but when I create a routine to
edit a
 > > record,
 > > It's return a error telling me that the query is incorrect.
 > > But when I execute the query using mysql CLI it word fine.
 > >
 > > I'm using a sample edit routin from John's book at page 334.
 > > I atach my project for you guys to check it.
 > >
 > > TIA
 > > BTW : good work john, it's a GREAT book!!!.
 > >
 > > --
 > > -- Yahoo!ID : ar1ef_310
 > > -- http://www.silentstudio.net
 >
 > Ups, forgot the attached project :(
 >
 > --
 > -- Yahoo!ID : ar1ef_310
 > -- http://www.silentstudio.net
 
 I looked in the book, and effectively, the example is false!
 
 DB.Find(x, y, ...) or DB.Edit(x, y, ...) generates the following
request:
 "SELECT * FROM x WHERE y".
 
 In other words, y is a WHERE clause (as said in the wiki).
 
 You can see what is sent to the database server by setting DB.Debug =
TRUE.
 
 Regards,
 
 --
 Benoit Minisini
 

 

 







-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...