This is a discussion on MySQL INSERT - When to Use HIGH_PRIORITY with Webpage within the PHP General forums, part of the PHP Programming Forums category; I've been having some problems inserting records into a mysql db - through a php page. According to php - the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've been having some problems inserting records into a mysql db -
through a php page. According to php - the insert statement was correct, and everything was working - ( mysql_query was returning true, and mysql_error() wasn't returning any information). However, the new record was never posted in the database -- and mysql_affected_rows() was returning that '0' rows were affected. Changing the INSERT statement to HIGH_PRIORITY seemed to fix this - in that my record was finally added to the DB -- but, reading the mysql documentation -- it doesn't seem like I should be using high_priority. Basically, the documentation states that using HIGH_PRIORITY " also causes concurrent inserts not to be used." .. isn't this kinda bad for a website? I mean, feasibly I could have several people all hitting it at the same time .. I can't have them ignored. What's the proper mechanism I should be using? Should I be Locking / Unlocking the table between inserts? Couldn't that also adversly affect my users? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|