?
Solved

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

Posted on 2016-09-26
7
Medium Priority
?
138 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
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…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

762 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