Thank for your look :)

Hello,

I try to compile string to Use it as Expression but it is taken as String.
How can I do to get an ³expression mode² ?

Here is the full code of the script :


//1. find the domain name
domainname = new LocalConnection();
var domain_str:String = "\""+domainname.domain()+"\"";
//2. Find the day and the month
var today_date:Date = new Date();
var a:Number = (today_date.getMonth());
var b:Number = (today_date.getDate());
var c;
var d;
var e;
//3.check the day number between 1 and 365
if (a == 0) {
    c = 0+b;
} else if (a == 1) {
    c = 31+b;
} else if (a == 2) {
    c = 59+b;
} else if (a == 3) {
    c = 90+b;
} else if (a == 4) {
    c = 120+b;
} else if (a == 5) {
    c = 151+b;
} else if (a == 6) {
    c = 181+b;
} else if (a == 7) {
    c = 212+b;
} else if (a == 8) {
    c = 243+b;
} else if (a == 9) {
    c = 273+b;
} else if (a == 10) {
    c = 304+b;
} else if (a == 11) {
    c = 334+b;
}
trace(c);
// there is 365 days, I got 365 db colomm name var1 to var365
d = "var"+c;
function tabti() {
    rec.text = flashSQL.MoveNext[d]; // problem REC IS NOW A STRING AND NOT
AN EXPRESSION
    flashSQL.Execute("UPDATE stats SET "+d+"="+d+"+1 WHERE
homepage="+domain_str);
}



var myListener1:Object = new Object();
myListener1.dataLoaded = function(success:Boolean, xmldata:XML) {
    if (success) {
        tabti();
    }
};
flashSQL.Execute("SELECT * FROM stats WHERE homepage="+domain_str, "test");
flashSQL.ObjectLoad.addListener(myListener1);
stop();
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to