Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help on how to extract specific data from access base into java script

 
Milos Markovic
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a problem when i want to extract specific data into java scrip page. this code imports all data

<vezbanje_sql_taglib:query var="news" dataSource="jdbcdbc:sajtic">SELECT * FROM country INNER JOIN news ON country.country_id = news.country_id;</vezbanje_sql_taglib:query>
<vezbanje_core_taglib:forEach var="news" items = "${news.rows}">
<tr>
<td align="center">${news.news}</td>
</tr>
</vezbanje_core_taglib:forEach>

but i want to import specific data based in it's country_id for example country_id 1, does anybody knows how i could do that?

for reward i am giving receipt for my girlfriends famous pancakes, believe me they are the best pancakes in the world
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't you just use a WHERE clause?
 
Milos Markovic
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried something like this

<vezbanje_sql_taglib:query var="news" dataSource="jdbcdbc:sajtic">SELECT * FROM country INNER JOIN news ON country.country_id = news.country_id WHERE ((news.country_id)='${param.country_id1}') ;</vezbanje_sql_taglib:query>
<vezbanje_core_taglib:forEach var="news" items = "${news.rows}">
<tr>
<td align="center">${news.news}</td>
</tr>
</vezbanje_core_taglib:forEach>

but it did not help
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well step 1 get the correct select statement working directly on the database (squirrel is good if you don't have a database specific tool), then transfer it to your javascript page.
Or if the rows returned isn't the problem, what is it?

 
Milos Markovic
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry but i did not understand you well, could you give me an example code?
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we can't give you sample code, we don't know your database.
 
Milos Markovic
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have uploaded my base, here's link

https://rapidshare.com/files/1643556835/base.mdb

thank you for trying to help me
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no intention of writing this for you.
do you have anyway of running sql against the database which isn't in your web page?
If you don't get one, squirrel is a good free application.

use that to get your sql working.

and I tried something like... is no use, we need to know exactly what you tried.
in a the smallest possibe example program.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic