Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Could you point how to deal with this kind of PHP notation?

Posted on 2016-09-26
7
Medium Priority
?
145 Views
Last Modified: 2016-10-03
Hi Experts

Could you point how to deal with this kind of PHP notation?

f.e.
%company_id$d

$query = static::procedure_query('call', 'get_dashboard_current',
            '%company_id$d, %date_begin$s, %date_end$s, %month$d, %group_id$s', $params);

Open in new window


The legacy code I'm maintaing is FuelPHP, I don't know if it's a particular feature of FuelPHP or of in general PHP.

Thanks in advance
0
Comment
Question by:Eduardo Fuerte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41816892
I suspect that usage is peculiar to your code or FuelPHP.  The standard usage for '%' is as a modulus operator in arithmetic.  http://php.net/manual/en/language.operators.arithmetic.php
0
 

Author Comment

by:Eduardo Fuerte
ID: 41819635
Hi

I really could not find the meaning of this code.
By the way the app is perfectly running...
0
 
LVL 51

Assisted Solution

by:Steve Bink
Steve Bink earned 1000 total points
ID: 41824343
Judging on my light research, I'm guessing this was a wrapper around a method used to call parameterized procedures through the FuelPHP DAL.  It does not appear to be any standard syntax from Fuel.  The syntax of the parameters looks like a custom format: '%', <name of parameter>, '$', <type of data>.  For example, the first would be a decimal/integer parameter named company_id.  I would also guess that $params is an array in which the keys match those parameter names.

This is all guesswork, though.  You'll need to find the definition of procedure_query() to know for sure.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 29

Accepted Solution

by:
fibo earned 1000 total points
ID: 41824522
Looks furiously like the arguments for a "prepared SQL statement" that the php code would pass to a SQL query.
0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 41826827
You are probably right.

Thanks for help!
0
 
LVL 29

Expert Comment

by:fibo
ID: 41826929
B-) Glad we could help!
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question