Page 1 of 1

Using Javascript to retrieve data from database

Posted: Sun Apr 14, 2013 3:49 pm
by azmal101
$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))"; 
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?

Re: Using Javascript to retrieve data from database

Posted: Sun Apr 14, 2013 6:13 pm
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.