Completed

Change database function in php script

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!

Compétences : HTML, MySQL, PHP

en voir plus : php script make custom avatar, pedigree database function php, create database registration php script, php mysql example, mysql create functions, mysql functions in php, mysql functions list, mysql functions in php pdf, php mysqli functions, mysql functions example, what is php mysql, php, change tone image php script sepia, change dns record php script, add video function php script, create database tables php script, word density function php script, export database xml php script, sql database copy php script, url rewrite database mysql php script

Concernant l'employeur :
( 43 commentaires ) Reims, France

Nº du projet : #15914387

Décerné à:

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 0 jours
(2 Commentaires)
1.5

21 freelance font une offre moyenne de $22 pour ce travail

shihan033010

Hi I am interested in your project requirements. I am expert in php and mysql

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(311 Commentaires)
6.8
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(23 Commentaires)
5.0
kazimking

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 De Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(23 Commentaires)
4.4
infoshemeer

I am Shemeer Basheerudhin, a top freelancer from India. I am enough of an artist to draw freely upon my imagination, neither especially clever nor especially gifted. I'm only very, very curious Relevant Skills and Exp Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(36 Commentaires)
3.7
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(4 Commentaires)
3.4
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(3 Commentaires)
2.0
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1 Évaluation)
0.8
choubeybhakti

Hello, I have been designing and developing mobile applications for iOS for more than 3 years and have a strong hand on Xcode, Swift, Objective - C, API integration, payment gateway integration, etc. Relevant Skills a Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
ayan7875

A proposal has not yet been provided

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
upendtu

interested Relevant Skills and Experience PHP,PYTHON,DJANGO,MYSQL,HTML5,CSS,Javascript,Ajax , Bootstrap , C and C++ Proposed Milestones $25 USD - hh

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1 Évaluation)
0.0
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(0 Commentaires)
0.0
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
sofianesoufi

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

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 10 jours
(0 Commentaires)
0.0
shwetagupta099

4+experience in PHP and MYSQL Relevant Skills and Experience PHP/MYSQL Proposed Milestones $25 USD - Full code

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
lunaj82

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 develope Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
ankitshow9

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 Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(0 Commentaires)
0.0
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
willingood

Hello, It's easy for me to perform in a few hours. Stay tuned, I'm still working on this proposal.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
prathyushapatel8

I'm good at coding with PHP and mysql. I can do this fast and easier Relevant Skills and Experience I used PHP coding to connect with databases before

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0