Hi,
I'm trying to get data from mysql database from a Jaggery app.
I created a table like this,

CREATE TABLE employee (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NULL,
    regyear *YEAR*
);

And entered few records.

Then I extracted the data in index.jag file from the db like this,

<%
    var db = new Database("jdbc:mysql://localhost:3306/mydb", "root",
"mypass");

    var result = db.query("select * from employee");

    print(result);
%>

I got this output,

[{"id" : 1, "name" : "saman kumara", "regyear" : {}}, {"id" : 2, "name" :
"nimal perera", "regyear" : {}}, {"id" : 3, "name" : "kapila kalinkga",
"regyear" : {}}, {"id" : 4, "name" : "sarath senarath", "regyear" : {}}]

Employee's id and name can be extracted, but I couldn't get the regyear
value. It's empty. What might be the problem?

Data type of `regyear` is `year`. Shall I have to take any further steps to
solve this?

I'm using Jaggery v1.0.0-SNAPSHOT_ALPHA3 and firefox browser.
Thanks,

-- 
Lalanke Athauda
Software Engineer
Mobile: 0772264301
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to