I have this part in an html page:
" $siteq="SELECT id from `".TBL_SITES."` WHERE name='SP'";
$r_Site=mysql_query($siteq);
$res=mysql_fetch_array($r_Site);
$site_id=$res['id'];
$r_UpdateList = mysql_query("SELECT * FROM `".TBL_UPDATES."` WHERE `XX` = 'Y' ORDER BY `upload_date` DESC" );
$r_Updates = mysql_query("SELECT * FROM `".TBL_UPDATES."` WHERE `XX` = 'Y' and id in (select update_id from `".TBL_SITES_UPDATES."` where site_id=".$site_id.") ORDER BY CASE `type` "."WHEN 'video960' THEN 1 "."WHEN 'video700' THEN 1 "."WHEN 'videophoto' THEN 3 "."WHEN 'photo' THEN 4 END, `upload_date` DESC ");"
The reason for the first part where it filters on records with SP is to make the page show records for site SP only. The sites are specified in table SITSE_UPDATES by numbers, for site SP this is number 3, then table SITES is used to convert from numbers to an alphabetical code, in this case from 3 to SP. So I might as well store the alphabetical code in SITES_UPDATES which I have done by adding a row named SITE where I added SP for all records.
I now need someone to change the code so that the selection is made from table SITES_UPDATES and row SITE instead of table SITES, so that I can remove table SITES from the database.
Maybe there is some extra coding attached to it somewhere else, I don't know. I attach the html page to this post so you can check it first.
I assume for an experienced programmer this is 10 minutes work so I pay $10 for this maximum. It is also an urgent job, it needs to be done right now... maybe the coding later needs to be duplicated to other pages in case I pay you $5 extra per page.
Please read everything and make sure you understand it before you bid. Thanks!
Hi! I can do it within an hour, message me so we can talk about it :)
Thank you,
Sofiane Soufi.
Relevant Skills and Experience
PHP
Proposed Milestones
$25 USD - Whole fix
Hello Sir,
hope you are fine,
I am interested in your work "Change database function in php script".
Its a very simple task for me i will do it ASAP.
Relevant Skills and Experience
I have 5 year experience in Web Development Service I am able to this job quickly.
You can view my profile for details to skills and customer feedback
https://www.freelancer.com/u/kazimking
Proposed Milestones
$10 USD - Task 1
I have 4+ year of experience in IT field and in this time of period I worked on many frameworks and Cms. I have the team of experienced quality designers.
Quality and service are my first priority.
I'll wait for your positive response.
Thanks & Regards,
Ankit S.
If i have understood the change on code then the change must be something just like this:
.. and name = 'SP' ..
Obviously including all changes needed on tables and more.
Relevant Skills and Experience
i have developed several projects using databases. Currently I am too a professor in an university I teaching databases, programming, programming of web application and mobile application.
Proposed Milestones
$15 USD - Apply changes to code and tables