07-04-06 06:11 PM
Sorry, I have been busy in Delphi today, so let's rewrite the code ;-)
var myNewsItem: NewsItem;
myNewsItem = new NewsItem( 'title', 'body');
myNewsItem.save();
// code
public class NewsItem {
private var title, body;
public function NewsItem( t, b) {
title=t; body = b;
}
public function save() {
var myMySQL = databaseConnection.getInstance();
var myQuery = myMySQL.createQuery();
myQuery.addParameter( "title", t );
return myQuery.execute();
}
}
>
>
> function action_save(Sender:Object)
> var myNewsItem: TNewsItem;
> begin
> myNewsItem := TNewsItem.Create( "MyNewsTitle", "MyNewsContent" );
> myNewsItem.save();
> end;
>
> As you might see already the NewsItem-class will be used to store the
> actual data to the server. Of course, you can use the same thing to
> store stuff through a webservice etc. Not a biggy?
> ________________________________________
_______
> FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
>
________________________________________
_______
FlashComm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
[ Post a follow-up to this message ]
|