Need MySQL Expert
- Status Completed
- Budget $30 - $250 USD
- Total Bids 14
Payment only, for the solution, not any incremental work to achieve the solution. Expert must have their own gear and software platform to perform the job, without access to Fahmah Jackson Resources.
Here is the problem.
I need to be able to provide atomic support for a thread safe way to update mysql database table that already exists. Here is my logical representation of the code execution...Make this able to work in a query box on phpmyadmin (GoDaddy). Here is my logical attempt which gets summarily rejected by the mySql engine for syntax errors.
IF (SELECT 1 = 1 FROM `tims_test_table` WHERE `item_id` = 99 AND `field_id` = 19 ) THEN
UPDATE `tims_test_table` SET `meta_value` = 'UPDATE' WHERE `item_id` = 99 AND `field_id` = 19;
INSERT INTO `tims_test_table` (item_id,field_id,meta_value) VALUES(99,19,'INSERT');
The result of the execution on the first run should put 'UPDATE' into the table. If run a second time, then 'INSERT' should be what I see in the 'meta_value' column in the table where item_id = 99 and field_id = 19.
The table has three columns (item_id, field_id, meta_value).
I am paying for a solution not an hourly rate. I cannot change the database in any way to suit alternative coding techinques or locking engines. I will take the solution and run it. If there are any error messages, I will forward them to the expert who accepts this bounty and the solution should be worked to it's conclusion. There is a 48 hour time limit to this project.
The problem is that I have two threads of code, updating the database and causing duplicate entries. I cannot use primary keys or other techniques to ensure atomic execution. Setting global locks and causing other threads to wait is not permissable either. The solution relies on mysql running a complex query/update/insert, atomically.
Get free quotes for a project like this
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online