Using Javascript to retrieve data from database

JavaScript related questions should go here.
Post Reply
azmal101
Posts: 5
Joined: Wed Mar 27, 2013 3:32 pm

Using Javascript to retrieve data from database

Post by azmal101 »

[syntax=php]$sql="CREATE TABLE Assessments (ID int (6), Title VARCHAR(80), Lecturer VARCHAR(80), Start VARCHAR (10), Due VARCHAR (10), Completed VARCHAR (10), Constraint FK_USERS_ASESSEMENT FOREIGN KEY (ID) REFERENCES Users (ID))"; [/syntax]

Hi guys..i just created this table. Is there a way I could view the data in these tables using javascript to retrieve the data?
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Using Javascript to retrieve data from database

Post by Helx »

You would have to put it in a PHP file, JavaScript (thankfully) can't access this kind of thing.

Have a look at JQuery's load() function.
Post Reply