Re: [Flashcoders] >> load 500 by 500 from db in flash

2007-10-25 Thread Tim Consolazio
I'd make sure your sql is tuned really well (I'm not a SQL expert so  
I always seek somebody that is), make sure you are only returning  
data you need (don' t return columns with data you don't need, SELECT  
* can be evil), and failing all that (and failing moving to remoting  
or something), partition your calls so that you don't do it all at  
once (first call for range A-M, then N-Z, or some such partition  
scheme that works).


On Oct 20, 2007, at 6:01 PM, Rich Rainbolt wrote:



On Oct 19, 2007, at 8:29 AM, CARABUS-Plus wrote:


Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500  
result ?

Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


Laurent


And the listener :


var myListener1:Object = new Object();
myListener1.dataLoaded = function(success:Boolean, xmldata:XML) {
if (success) {
trace(xmldata);
if (comStatus == "loading") {
display.removeAllColumns();
display.columnNames = ["Spécialité", "Nom", "Ville"];
display.getColumnAt(0).width = 120;
display.getColumnAt(1).width = 100;
display.getColumnAt(2).width = 115;
var dat:Array = new Array();
_root.finder_txt.text = "il y a
"+xmldata.firstChild.childNodes[3].childNodes.length+" réponses";
for (var i:Number = 0;
idat.push({Spécialité:unescape(xmldata.firstChild.childNodes 
[3].childNodes[i]

.childNodes[14].childNodes),
Nom:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].childNodes[4].ch
ildNodes),Ville:unescape(xmldata.firstChild.childNodes 
[3].childNodes[i].chil
dNodes[8].childNodes),Tel:unescape(xmldata.firstChild.childNodes 
[3].childNod
es[i].childNodes[9].childNodes),Fax:unescape 
(xmldata.firstChild.childNodes[3
].childNodes[i].childNodes[10].childNodes),CP:unescape 
(xmldata.firstChild.ch

ildNodes[3].childNodes[i].childNodes[7].childNodes),

Rue:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].childNodes[6].ch
ildNodes),eMail:unescape(xmldata.firstChild.childNodes 
[3].childNodes[i].chil

dNodes[11].childNodes),
lat:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].childNodes[16].c
hildNodes),lon:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].child
Nodes[17].childNodes),lic:unescape(xmldata.firstChild.childNodes 
[3].childNod

es[i].childNodes[19].childNodes)});
}
display.dataProvider = dat;
} else if (comStatus == "sending") {
msg = "Data Sent Successfully. You can now reload!";
}
}
};
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Tim Consolazio
[EMAIL PROTECTED]



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] >> load 500 by 500 from db in flash

2007-10-23 Thread Rich Rainbolt

Unsubscribe Remove


On Oct 19, 2007, at 11:11 PM, Ricky Bacon wrote:


CARABUS-Plus wrote:

Im using FLASHSQL to load data in flash from php db
Theres is too much data to load, how can I do to load 500 by 500  
result ?

Thank you
myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


My SQL is rusty, but assuming you are using MySQL (no pun there...):

SELECT * FROM NP_socs_nancy WHERE soc_09='foo' ORDER BY soc_01  
LIMIT 1, 500;


The LIMIT command uses [offset, max rows], so LIMIT 1, 500 would  
start at row 1 and return 500 rows from the db.  You can increment  
the offset when the data has parsed successfully and query again.


-Ricky
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] >> load 500 by 500 from db in flash

2007-10-23 Thread Rich Rainbolt

Unsubscribe Remove


On Oct 20, 2007, at 5:44 AM, Jordan L. Chilcott wrote:

If you want to limit the number of your results, add LIMIT(0, 500)  
at the end of your statement.


jord

On Oct 19, 2007, at 11:29 AM, CARABUS-Plus wrote:


Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500  
result ?

Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


Jordan L. Chilcott, President
Interactivity Unlimited
Guelph, Ontario
-
Tel:  (519) 837-1879
Fax: (519) 837-8610
mailto:[EMAIL PROTECTED]
http://www.interactivityunlimited.com
iChat/AIM: j1chilcott
Skype: bear-faced-cow
SightSpeed: [EMAIL PROTECTED]

Author: "Building Web Sites with Macromedia Studio MX"
Author: "Building Dynamic Web Sites with Macromedia Studio MX"
Author: "Flash Professional 8: Training From the Source"
Author: "Foundation Flash 8 Video"


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] >> load 500 by 500 from db in flash

2007-10-22 Thread Rich Rainbolt


On Oct 19, 2007, at 8:29 AM, CARABUS-Plus wrote:


Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500  
result ?

Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


Laurent


And the listener :


var myListener1:Object = new Object();
myListener1.dataLoaded = function(success:Boolean, xmldata:XML) {
if (success) {
trace(xmldata);
if (comStatus == "loading") {
display.removeAllColumns();
display.columnNames = ["Spécialité", "Nom", "Ville"];
display.getColumnAt(0).width = 120;
display.getColumnAt(1).width = 100;
display.getColumnAt(2).width = 115;
var dat:Array = new Array();
_root.finder_txt.text = "il y a
"+xmldata.firstChild.childNodes[3].childNodes.length+" réponses";
for (var i:Number = 0;
idat.push({Spécialité:unescape(xmldata.firstChild.childNodes 
[3].childNodes[i]

.childNodes[14].childNodes),
Nom:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].childNodes[4].ch
ildNodes),Ville:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].chil
dNodes[8].childNodes),Tel:unescape(xmldata.firstChild.childNodes 
[3].childNod
es[i].childNodes[9].childNodes),Fax:unescape 
(xmldata.firstChild.childNodes[3
].childNodes[i].childNodes[10].childNodes),CP:unescape 
(xmldata.firstChild.ch

ildNodes[3].childNodes[i].childNodes[7].childNodes),

Rue:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].childNodes[6].ch
ildNodes),eMail:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].chil

dNodes[11].childNodes),
lat:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].childNodes[16].c
hildNodes),lon:unescape(xmldata.firstChild.childNodes[3].childNodes 
[i].child
Nodes[17].childNodes),lic:unescape(xmldata.firstChild.childNodes 
[3].childNod

es[i].childNodes[19].childNodes)});
}
display.dataProvider = dat;
} else if (comStatus == "sending") {
msg = "Data Sent Successfully. You can now reload!";
}
}
};
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] >> load 500 by 500 from db in flash

2007-10-21 Thread Jordan L. Chilcott
If you want to limit the number of your results, add LIMIT(0, 500) at  
the end of your statement.


jord

On Oct 19, 2007, at 11:29 AM, CARABUS-Plus wrote:


Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500  
result ?

Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


Jordan L. Chilcott, President
Interactivity Unlimited
Guelph, Ontario
-
Tel:  (519) 837-1879
Fax: (519) 837-8610
mailto:[EMAIL PROTECTED]
http://www.interactivityunlimited.com
iChat/AIM: j1chilcott
Skype: bear-faced-cow
SightSpeed: [EMAIL PROTECTED]

Author: "Building Web Sites with Macromedia Studio MX"
Author: "Building Dynamic Web Sites with Macromedia Studio MX"
Author: "Flash Professional 8: Training From the Source"
Author: "Foundation Flash 8 Video"


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] >> load 500 by 500 from db in flash

2007-10-21 Thread Ricky Bacon

CARABUS-Plus wrote:

Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500 result ?
Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


My SQL is rusty, but assuming you are using MySQL (no pun there...):

SELECT * FROM NP_socs_nancy WHERE soc_09='foo' ORDER BY soc_01 LIMIT 1, 500;

The LIMIT command uses [offset, max rows], so LIMIT 1, 500 would start 
at row 1 and return 500 rows from the db.  You can increment the offset 
when the data has parsed successfully and query again.


-Ricky
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] >> load 500 by 500 from db in flash

2007-10-19 Thread CARABUS-Plus
Im using FLASHSQL to load data in flash from php db

Theres is too much data to load, how can I do to load 500 by 500 result ?
Thank you

myFlashSQL.Execute("SELECT * FROM NP_socs_nancy WHERE soc_09 =
\""+categ_var+"\" ORDER BY soc_01");


Laurent


And the listener :


var myListener1:Object = new Object();
myListener1.dataLoaded = function(success:Boolean, xmldata:XML) {
if (success) {
trace(xmldata);
if (comStatus == "loading") {
display.removeAllColumns();
display.columnNames = ["Spécialité", "Nom", "Ville"];
display.getColumnAt(0).width = 120;
display.getColumnAt(1).width = 100;
display.getColumnAt(2).width = 115;
var dat:Array = new Array();
_root.finder_txt.text = "il y a
"+xmldata.firstChild.childNodes[3].childNodes.length+" réponses";
for (var i:Number = 0;
ihttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders