Find Jobs
Hire Freelancers

Datatables server-side processing - PHP / PostgreSQL - advanced queries

$30-250 USD

Complété
Publié il y a presque 6 ans

$30-250 USD

Payé lors de la livraison
I´m trying to figure out how to group data from joined table in Datatables server-side PHP script. The data for datatables in prepared by the PHP script using an SSP class modified for postgreSQL connection. The table consists of products and their categories. Everything is working well, but I cannot figure out how to prepare the SELECT statement in order to group product categories per product. To make it easier to understand my problem you can see a setup example below. PostgreSQL DB table structure: Table: products_table ------------------------------------------ id | title | pr_template_id ------------------------------------------ 1 | Product 1 | 1 2 | Product 2 | 2 3 | Product 3 | 3 ------------------------------------------ Table: product_categories_template_relations ------------------------------------------ id | pr_template_id | category_id ------------------------------------------ 1 | 1 | 1 2 | 1 | 2 3 | 2 | 2 4 | 2 | 3 5 | 3 | 1 ------------------------------------------ Table: product_categories ------------------------------------------ category_id | title ------------------------------------------ 1 | Category 1 2 | Category 2 3 | Category 3 ------------------------------------------ Server side script (PHP): <?php $table = <<<EOT ( SELECT [login to view URL], a.pr_template_id, [login to view URL] as producttitle, b.pr_template_id, b.category_id, [login to view URL] as cattitle FROM products_table a LEFT JOIN product_categories_template_relations b ON a.pr_template_id = b.pr_template_id LEFT JOIN product_categories c ON b.category_id = c.category_id ) temp EOT; ?> Current Datatables results: ------------------------------------------ Product ID | Product title | Category ------------------------------------------ 1 | Product 1 | Category 1 1 | Product 1 | Category 2 2 | Product 2 | Category 2 2 | Product 2 | Category 3 3 | Product 3 | Category 1 ------------------------------------------ Datatables results I´m looking for: --------------------------------------------------------- Product ID | Product title | Category --------------------------------------------------------- 1 | Product 1 | Category 1, Category 2 2 | Product 2 | Category 2, Category 3 3 | Product 3 | Category 1 --------------------------------------------------------- So basically I´m currently stuck at Server side script (PHP) and how to formulate the SQL query correctly.
N° de projet : 17247154

Concernant le projet

16 propositions
Projet à distance
Actif à il y a 6 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux
Décerné à :
Avatar de l'utilisateur
You need use this script SELECT [login to view URL], [login to view URL] as producttitle, string_agg(DISTINCT [login to view URL], ',') as cattitle FROM products_table a LEFT JOIN product_categories_template_relations b ON a.pr_template_id = b.pr_template_id LEFT JOIN product_categories c ON b.category_id = c.category_id group by [login to view URL], [login to view URL]
$35 USD en 0 jour
5,0 (16 commentaires)
4,4
4,4
16 freelances proposent en moyenne $163 USD pour ce travail
Avatar de l'utilisateur
Hello, I'm Abu Gosia. I'm interesting your project very well I'm good in Website Design, PHP, Laravel, Codeigneter, Wordpress, C#, .Net, MVC, Angular.js, ASP.NET expert. I m quite well experienced in these jobs. Let's go ahead with me I want to service for you continously. Thanks
$222 USD en 3 jours
4,9 (158 commentaires)
6,7
6,7
Avatar de l'utilisateur
Datatables server-side processing - PHP / PostgreSQL - advanced queries Hello, I have read the details that you mentioned in your project description. I am willing to work with you on this project. I hope that we can do this project together , just let me know when you want to start. Looking forward for your reply dear. Thank You!
$144 USD en 3 jours
4,9 (73 commentaires)
6,5
6,5
Avatar de l'utilisateur
Hello, I can help with you in your project Datatables server-side processing - PHP / PostgreSQL - advanced queries. I have more than 5 years of experience in Datatables, PHP, PostgreSQL. We have worked on several similar projects before! We have worked on 350+ Projects. Please check the profile reviews. I can deliver your job with in your deadline. Please ping me for more discussion. I can assure the 100% job satisfaction. Thanks,
$250 USD en 3 jours
4,9 (50 commentaires)
6,1
6,1
Avatar de l'utilisateur
Hi, I am server side expert. I have read your description i have understood what you want. Please get in touch so we can start your project. Thanks
$100 USD en 2 jours
4,9 (73 commentaires)
5,9
5,9
Avatar de l'utilisateur
Hi, I read your requirement and understood that you need some one good at PHP and Postgres SQL knowledge to write best queries on grouping. I am good at both the technologies, last week I developed and delivered an application using Postgres SQL. Please come for chat, let us discuss and will finish the work Thanks Paul
$90 USD en 2 jours
4,9 (23 commentaires)
5,0
5,0
Avatar de l'utilisateur
HELLO SIR . HOW ARE YOU? I HAVE GONE THROUGH YOUR REQUIREMENT AND I AM SURE I CAN HELP YOU. I HAVE MORE THAN 7 YEARS EXPERIENCE IN CI, MYSQL, HTML, Graphic Design, PHP, Website Design. FOR FURTHER DISCUSSION PLEASE COME TO CHAT WE CAN START NOW
$155 USD en 3 jours
4,9 (38 commentaires)
4,2
4,2
Avatar de l'utilisateur
Hello Sir/Madam, Wish you a very good day. I have been working as a professional senior full stack developer for 5 long years now. I have spent my 5 years to get the best experience as a full stack developer using technologies like PHP, HTML, CSS, Angular JS, NodeJS, JS and framework like Laravel, Magento, WordPress, CodeIgniter.I have a good experience with creative and professional design website and mobile application by using the platform like HTML5, Bootstrap, CSS3, illustrator, and photoshop. I have also experience in development of E-commerce websites, Healthcare projects, Responsive websites, Web apps and Dashboards etc. I have a experience with Curl operations, API, and payment integration and using Laravel framework as a backend in web apps. I always aim to maintain a long-term relationship with my clients. I had gone through your project requirement and I can make your project as per your expectation. You can also see my company Portfolio at promition.com. I will be happy and give my 100% to develop your esteem website development If I will be given I chance to work with you. Above all of these, getting satisfaction from my work is assured because satisfying the clients through my works is my best concern. Thanks!
$155 USD en 3 jours
5,0 (4 commentaires)
2,8
2,8
Avatar de l'utilisateur
Hi, I have similar work experience in this work. i love to complete this task on given schedule. please share you requirement specification details.
$244 USD en 7 jours
5,0 (5 commentaires)
1,8
1,8

À propos du client

Drapeau de DENMARK
Ringsted, Denmark
5,0
24
Méthode de paiement vérifiée
Membre depuis août 6, 2012

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.