|
|||
Data xleh masuk dlm table..
nie code yg saya gune utk insert data dlm table.. tp xde 1 data pun yg msuk..
PHP Code:
ape silapnyer utk dtabase care_pair(atas)?? ni code utk database yg lain, dgn code yg same: PHP Code:
|
|
||||
well, if u ask me to see any difference on the codes i can tell is this 2
GetSQLValueString($HTTP_POST_VARS['Supp_Id'], "text") GetSQLValueString($_POST['Report_No'], "text"), anyway, my suggestion is, dun go so fast in inserting a while lot of data without trying it 1st. Do a similar codes but only insert 1 or 2 data, just to make sure everything is working fine. Then when u r sure the data is inserted to the db successfully, then only u proceed with the rest of ur data ![]() if u straight away copy and paste and modify, u wont know where's does the error comes from if the data cannot b insert ![]()
__________________
Boonage - Freedom is Everything |
|
|||
Quote:
it is because, i used other database with the same method/code to insert.. n it worked fine(data inserted).. so, dunno whts wrong with this database.. |
|
|||
okay.. now im using this sql to insert..
PHP Code:
![]() when i refresh the form, there would be an sql error Quote:
|
|
||||
if ur Report_No is ur primary key, i assume u will b using auto-increment right? so if u r using auto-increment, u do not need to grab any variable from the form. so the $RNo=$_POST['Report_No']; shouldn't be there so as in the INSERT sql.
of course u will encounter such error bcoz u r using xxxx=$_POST["xxxx"] to grab the variables stored in the https, so once u refresh it, everything in the https will be refresh and store nothing, so ur $_POST has nothing to grab and tat correspond to ('','', '','', '','', '','', '', '','','', '') again the same advise. Try and few data 1st before u really put in so many into the test.
__________________
Boonage - Freedom is Everything |
|
|||
Thanks.. but my Report_No(primary key) in Report table is not an auto increment.. it has to be filled in by users. and yes, i had tried with few data before, but it still has the same prob..
i think i got the Quote:
|
|
||||
is seldom having the database's primary key to be insert by user themselve.
but anyway, i will try it out tonight when i m at home. coz i cant test it now in the offfice ^^ hope u can wait, but if u have any update on it do post it here ![]() mean time if anybody out there which see this and knows the solution, please do reply ![]()
__________________
Boonage - Freedom is Everything |
|
||||
sorry for the late trial on this coz is been bz for me for the whole week in the office as well as at home.
but from wat u said above, i would like to know is all ur sql. php processing code and form in the same page?
__________________
Boonage - Freedom is Everything |
|
|||
yeyy.. finally succeeded!!
i can insert my data into database without 'that blank columns'!! i tried using a hidden field named MM_insert on the form. this is my code: PHP Code:
but sadly, i still had problems with the sql to view all the data.. ![]() |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
















