Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Web Programming
Reload this Page Error code on SQL syntax
Reply
 
Thread Tools Display Modes
(#11 (permalink))
Old
Member
stannwl is on a distinguished road
 
Posts: 38
Join Date: May 2012
Default 06-18-2012, 08:17 AM

Hi Grace,

Thanks for your help. Really appreciate your time and effort.

I've manage to solve the issue. Basically i just delete the additional data (min amount) and import the file. (same as my older working version)

Then i slowly add the new data one by one and import the sql file while adding the new data. Somehow, the file is working and no error code. not exactly sure how it's solve, but at least i'm seeing the problem now.

Simply Into Mortgage
www.simplymortgage.com.sg

Free cash rebate when finance home loan through Simply Mortgage
Reply With Quote
Sponsored Links
(#12 (permalink))
Old
Member
stannwl is on a distinguished road
 
Posts: 38
Join Date: May 2012
Default 06-18-2012, 09:52 AM

Hi Grace,

Based on my code, do you know how can i add in a new data (date) and how should i go about to add it into the list of data?

And on other files where i need to use it, how can i call for it and use it?

Currently, all data declare on sql file, is being called out as such:

$sibor_min_amount1 = $row['sibor_min_amount1'];

For the date, how should i go about doing it and get it display on my files?


Simply Into Mortgage
www.simplymortgage.com.sg

Free cash rebate when finance home loan through Simply Mortgage
Reply With Quote
(#13 (permalink))
Old
Senior Member
grace1004 is on a distinguished road
 
Posts: 733
Join Date: Dec 2010
Default 06-18-2012, 03:03 PM

To add `date` field at the end, click SQL tab, enter the following code in the SQL box, and click Go button.

Code:
alter table wealsolcal_calculator add date datetime;
To check if `date` field is added, click Structure tab (you will see `date` field added).

To add data to `date` field, enter the following update query in the SQL box, and click Go button.

Code:
update wealsolcal_calculator set date=now() where id='admin';
To check if current date/time is added, click Browse tab (you will see something like: 2012-06-18 08:59:04)

Looks like you are importing sql file whenever you add data. You don't need to do that. If you want to insert
new data for another row, enter insert query in the SQL box. If you are inserting data for all fields, you don't
need to list field names; just list values as shown below:

Code:
insert into wealsolcal_calculator values ('SIBOR', 'SOR', 'Fixed Rate', 1.00, 1.00, 2.00, 2.00, 3.00, 3.00, 4.00, 4.00, 
1.00, 1.10, 1.20, 1.30, 2.00, 2.10, 2.20, 2.30, 3.00, 3.10, 3.20, 3.30, 4.00, 4.10, 4.20, 4.30, 'admin',
'c2431a9d201559f8de1dcfb6a9dd3168', now()); 

//To insert another row 
insert into wealsolcal_calculator values ('aaaa', 'bbb', 'ccc', 1.50, 1.50, 2.50, 2.50, . . . . . . . . . , now());
To output date/time, use $row['date'];

Last edited by grace1004; 06-18-2012 at 03:16 PM.
Reply With Quote
(#14 (permalink))
Old
Member
stannwl is on a distinguished road
 
Posts: 38
Join Date: May 2012
Default 06-19-2012, 11:30 AM

Thanks for the explaination. This is really useful cos i might add more data later on.

Simply Into Mortgage
www.simplymortgage.com.sg

Free cash rebate when finance home loan through Simply Mortgage
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com