/    Sign up×
Community /Pin to ProfileBookmark

Convert sql queries table output to html table using javascript

Hi,

Can anyone help me with this query. How to convert sql query table to html table. The sql table is like

number characteristics
0 some abc
1 some def
2 some ghi

I want to convert this table into html table using javascript.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@konithomimoAug 10.2008 — If you are pulling data from a DB then it is better to generate the HTML table using a server-side script such as PHP. If you just have a datafile with it though then you can use JS, although it is not preferable. If you are trying to convert from a file to HTML, then what type of output does the SQL data have? Not the graphical view, but the actual data . . . usually a CSV or XLS type file.
Copy linkTweet thisAlerts:
@r01320authorAug 10.2008 — when I retrieve the data from sql querie it give me in the text file(notepad). I need that file to convert in the html file which I can view in the table format. As u said I can convert that file using javascript, so can u help me out how to write the code using the js. please.
×

Success!

Help @r01320 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...