Find Jobs
Hire Freelancers

Amend this code from static to dynamic

$30-250 USD

Completed
Posted about 10 years ago

$30-250 USD

Paid on delivery
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
Project ID: 5562659

About the project

7 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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 in 2 days
4.9 (321 reviews)
7.3
7.3
7 freelancers are bidding on average $149 USD for this job
User Avatar
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 in 1 day
4.9 (300 reviews)
7.5
7.5
User Avatar
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 in 2 days
5.0 (5 reviews)
3.7
3.7
User Avatar
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 in 5 days
4.8 (3 reviews)
3.3
3.3
User Avatar
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 in 1 day
5.0 (3 reviews)
3.0
3.0

About the client

Flag of UNITED KINGDOM
London, United Kingdom
5.0
1
Member since May 9, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.