1

I have a table that currently has "438,442" rows. The next AutoIncrement is "854,040"

My clients sometimes report that their record does not save. Though system says it does but when they get back later, the record was not there.

So I wanted to ask if the problem is due to high number of records in the table or something similar ?

I am using standard PHP function to insert MySQL:

$Qry = "INSERT INTO lesson_result (user, marks, grade, date) VALUES ( 23127, 88, 'B', '2012-11-25')";
$isInserted = @mysql_query($Qry) or die(mysql_error());

Another thing I found while I was checking MySQL Runtime Information using PhpMyAdmin is:

Table_locks_waited : 2,298

Can we consider this as the cause of problem?

D3 K
  • 684
  • 1
  • 12
  • 19
  • can you show your code so that we can help you – NullPoiиteя Nov 30 '12 at 04:48
  • Do you have a `TRANSACTION` that's started but not committed? – tadman Nov 30 '12 at 04:49
  • @D3 K : I do not think it's for the records, could you please show a piece of code about that? – avolquez Nov 30 '12 at 04:57
  • I have updated my question with the code, that I am using to insert. This is the working code. It has been working perfectly. But from the past few months, I have started receiving random complaints about not saving their results! – D3 K Nov 30 '12 at 05:22
  • For one thing I don't think you should ever use @ (like Gerry, I've yet to see a proper use). Again, not an expert, but I don't think you should use `mysql_` function... deprecated and unsafe. Use `mysqli_` or `pdo`, although I know this isn't always possible in a commercial environment.. http://stackoverflow.com/questions/136899/suppress-error-with-operator-in-php – Raekye Nov 30 '12 at 06:50
  • Thanks Raeki for your comments. The system was bit old. So I have to stay with until we build something new. Any ideas about the question ??? – D3 K Dec 01 '12 at 14:38

0 Answers0