Find Jobs
Hire Freelancers

Amend this code from static to dynamic

$30-250 USD

Concluído
Publicado há aproximadamente 10 anos

$30-250 USD

Pago na entrega
Hi, I'm using this composer package: [login to view URL] It's essentially a business ruleset engine for php. Here is a hardcoded example I got working: [login to view URL] However, what I require are that rules are derived from a database. Instead of them being hardcoded in the above example. So lets say I have an array. $values = array(); $values['country'] = 'Canada'; $values['country'] = 'USA'; $values['country'] = 'UK'; $values['device'] = 'mobile'; $values['device'] = 'tablet'; $values['device'] = 'desktop'; So in pseudo code: loop through every array category (country, device) create new rule. $rb['country]->condition (equalTo or contains) (array value - UK, USA, Canada). once the rules are created then $rb->create( rb->logicalAnd( rb->logicalOr( ... insert rules for country ), ... insert rules for device ), function() { execute something } ); I hope you get the idea. Essentially, the rules need to be generated from the data. There can be multiple logicalOR rules in the 1 logical AND instance. Thanks
ID do Projeto: 5562659

Sobre o projeto

7 propostas
Projeto remoto
Ativo há 10 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
Hi Good day I can do this project for you. I can make the rule set based from database than hardcoded. Looking forward to hear from you. Thanks Rinsad
$134 USD em 2 dias
4,9 (321 avaliações)
7,3
7,3
7 freelancers estão ofertando em média $149 USD for esse trabalho
Avatar do Usuário
i see from the description basic idea of you need something changed from the rules function , we need to discuss more on freelancer message board then i can finish the code for you asap so let me know details.
$257 USD em 1 dia
4,9 (300 avaliações)
7,5
7,5
Avatar do Usuário
Hello Sir, We have team of developers proficient in web development and scripting. Though we are new to freelancer but have completed over 100 projects with 100% client satisfaction. We have read your description about rule engine thoroughly. We are interested in working with you on this project. Looking forward to hear from you on this project. Thanks Shiv Agrawal SuiGen Solutions
$100 USD em 2 dias
5,0 (5 avaliações)
3,7
3,7
Avatar do Usuário
Hello, Greetings and hope you are doing well. I have seen your requirement for your project we can do it for you. we are 9 programmers work in team. we have more experience in PHP, Wordpress, Joomla, Magento, Development and Webdesigning. We are looking for opportunities to work for your project. Our motto is to provide ‘absolute quality deliverables with very affordable rates’. We would like to assure you that you will get daily update from our side and life time support for your project. Thank You and looking forward to hear from you. Thanks & Regards, Mansi Bhalodi
$185 USD em 5 dias
4,8 (3 avaliações)
3,3
3,3
Avatar do Usuário
I think what you need is an extension of the RuleBuilder class, for instance with the following syntax: ...... $rb->DBconnection = $mydbconnection; // gives the current db connection to the builder $rule = $rb->create( $rb->logicalAnd( $rb->logicalOrFromDBColumn('countriesTable','countryName') // values are from countryName column $rb->logicalOrFromDBColumn('devcesTable','deviceType') ) i.e. you specify the logical Or with two arguments that say what is the table and what is the column wher values come from. At the beginning you give to the builder class the information of the currently open DB connection. Or you can specify a more complex SQL query with a syntax like the following: $rb->logicalOrFromDBQuery('SELECT countryName FROM countries WHERE etc etc') I can do such an extension in 1 day max.
$90 USD em 1 dia
5,0 (3 avaliações)
3,0
3,0

Sobre o cliente

Bandeira do(a) UNITED KINGDOM
London, United Kingdom
5,0
1
Membro desde mai. 9, 2012

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.