En cours

Php function to get data from mysql.

Using php get 10 values from a mysql table with a select and if the 10 values are not obtained then the function must get the rest of the values needed for the 10 under another select.

The following function must be modified to get the $array.

private function getTagArray($idChannel){

$array = array();

$sql = "SELECT idTagPhoto FROM ((SELECT idTagPhoto FROM ((SELECT idTagPhoto,votes FROM tagphotos_view WHERE (idChannel = $idChannel) ORDER BY idTagPhoto DESC limit 500) as tagphotos_view3) ORDER BY votes DESC limit 100) as tagphotos_view2) GROUP BY idTagPhoto ORDER BY RAND() LIMIT 10";

$result = mysqli_query($this->db, $sql);

$rows = mysqli_num_rows($result);

while($row = $result->fetch_assoc()){

array_push($array, $row["idTagPhoto"]);

}

return $array;

}

}

The "SELECT" of my code must be respected to get the same result, but the function must be modified so that if the select does not reach 10 data, for example if this select only obtains 7 data, the other 3 data must obtain them in another way:

"SELECT idTagPhoto FROM tagphotos_view WHERE (idChannel = 1) LIMIT 3"

I will try the code on my computer to see if it works.

Compétences : MySQL, PHP, Architecture Logicielle

en voir plus : php push mysql data, php mysql data push, software write mq4, software write chip epson, useful software write book, software write web specs, free software write user guide, software write edid, free software write company profile, software write websites idea, software write book images, software write books, software write protection, free software write book, software write book, display mysql data php ajax, excel report mysql data using php, jquery ajax json php mysql data entry example, php mysql data analysis, php export mysql data pdf, php mysql data dictionary, software write protect software, php class display mysql data, display mysql data php, software write technical manual

Concernant l'employeur :
( 106 commentaires ) madrid, Spain

Nº du projet : #12711134

23 freelance font une offre moyenne de $26 pour ce travail

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(191 Commentaires)
9.0
shihan033010

A proposal has not yet been provided

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(318 Commentaires)
6.8
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(157 Commentaires)
6.6
jinkhan888

ILM Techno Solution.Pvt.Ltd.India. [login to view URL] [login to view URL] About:- Welcome to ILM Techno Solutions Pvt. Ltd. clients ranging from Indian business giants to growing enterprises. As a d Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(69 Commentaires)
5.7
Nawaz091993

Greetings! I am an expert PHP programmer and I have just seen your project description. I can complete this function modification within an hour max. Looking forward to hear from you.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(81 Commentaires)
6.1
webarox

Hello Greetings of the day!!! I’ve carefully gone through your job posting. I am having 5+ years of experience in Word press, Shopify, HTML and PHP. I have designed many e-commerce and woo-commerce websites in last Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(64 Commentaires)
5.8
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(58 Commentaires)
5.8
testotorko

Hi, I read carefully your project, and I wanna do it for you. If you wanna work together, send me a message to discuss details. I am an experienced Web Developer and Web Designer, and have worked with wide variety of s Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(47 Commentaires)
5.1
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(57 Commentaires)
5.0
avinsoln

Respected Recruiter, Went through the Job Post and I am Confident to do your Task. My name is Avinash Singh and I am a Full Stack Developer with experience of 6 years. About my work on Php / MySQL : A. Php Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(28 Commentaires)
5.2
DevvTime

Hello there i am a professional and have extensive experience, please contact to discuss in details.. i will be waiting thanks regards

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(27 Commentaires)
5.1
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(47 Commentaires)
4.6
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(11 Commentaires)
4.1
infoRidge

Greetings from InfoRidge Technology !! Pls go through our work will help you to take decision . [login to view URL] Below is a gist of our work. * [login to view URL] --- E-Commerce Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(14 Commentaires)
3.9
waleedikhlaq2

Hi I am web and desktop developer. I have more then 4 years of experience in development especially in web the most. Currently I am running a company. Although I am new to freelancer but u have vast experience in web. Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(3 Commentaires)
3.5
doublizer

Hello there. This looks like a simple task and I should be able to deliver it quickly. We can discuss more details over chat if you're interested. Thanks in advance. Best regards, Diogo Bragança

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(12 Commentaires)
3.2
carlamorillo2

Hi, hope you're fine. This is an easy task, should be something very quick. I'm a web developer and database admin. If you agree, I would suggest to use the same query with an "UNION" clause to merge the record fro Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(5 Commentaires)
3.0
SamamaJaved

Hello dear, i can do this for you. i have read your requirements. seriously, if you want this work be done, contact me so that i can be able to help you Thanks. and Take care..

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(12 Commentaires)
3.8
Hassan1859

Hey, I had a chance to go through your complete job description. And we think this is the best project matching with our skills. I would like to have a verbal conversation with you to walk through your web developmen Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(2 Commentaires)
2.4
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(3 Commentaires)
2.0