Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
id name class sub1 sub2 sub3 tot

1 zxz VII 100 85 90 275
2
3
4
5
.
.
upto 500

What I have tried:

$sql = "INSERT INTO students ". "(name,class,sub1,
sub2,sub3,tot) ". "VALUES('$name','$class',$sub1, $sub2,$sub3,$tot)";
Posted
Comments
ZurdoDev 25-Sep-18 7:46am    
You did something wrong.
Dave Kreskowiak 25-Sep-18 9:00am    
There isn't sufficient information to determine a cause. We don't have enough of the code.

Did you check the data where the inserts stop? Does the code plain stop at the point where the data stops? Is there an error thrown? Is there error handling code around this sql operation that is swallowing the error instead of reporting it?

Since you're using what amounts to string concatenation to build the INSERT query, I'd be willing to bet the code crashes when the data has a ' character in it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900