Re: [PHP] Re: Preferred Syntax

2011-12-16 Thread Adam Richardson
On Fri, Dec 16, 2011 at 11:53 PM, Eric Butera wrote: > To all the people who responded to this thread: > It is 2011 - please stop writing code like this. > > To the OP: > I'm glad you're asking questions and realizing you're not happy with > your current abilities and suspect there's a better way

Re: [PHP] call_user_func_array and bind_result

2011-12-16 Thread Mari Masuda
On Dec 16, 2011, at 4:51 PM, David Harkness wrote: > Each *value* in the array must be a reference to an existing variable--they > cannot be null or direct values. [snip] Thank you very much for your explanation and example code. I was missing the fact that the *values* in the array must be

Re: [PHP] Re: Preferred Syntax

2011-12-16 Thread Eric Butera
On Thu, Dec 15, 2011 at 5:46 PM, Ross McKay wrote: > Jim Lucas wrote: > >>I second this example, with one minor change, I would add '{' and '}' around >>variables. >> >>echo <<>>   href="/mypage.php/{$page_id}">{$page_name} >>HTML; >> >>This works for $variables, $objects, and variable functions c

Re: [PHP] call_user_func_array and bind_result

2011-12-16 Thread David Harkness
Each *value* in the array must be a reference to an existing variable--they cannot be null or direct values. I didn't try this with bind_param(), but I create a function that takes reference arguments and got it to work with call_user_func_array(): function foo(&$x, &$y) { $x *= 2; $y *= 3; }

Re: [PHP] dealing with this code $_POST['custom´]

2011-12-16 Thread Govinda
> "syntax error" I'm not an advanced user of PHP, but I really don't get why > adding just another id (of a contact list) would be a "syntax error" if I > only use 148:147 it works fine! Hi Carlos, it is called "ternary operator". Search for "ternary operator" in this page: http://www.php.net/

Re: [PHP] dealing with this code $_POST['custom´]

2011-12-16 Thread Marc Guay
> $saving_list = $_POST['custom'] == 'FR' ? 148 : 147; Hi there, here's a quick translatation of this code that might help you understand it better: if ($_POST['custom'] == 'FR'){ $saving_list = 148; } else{ $saving_list = 147; } -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] dealing with this code $_POST['custom´]

2011-12-16 Thread Carlos Sura
Hello mates, My problem is very simple, I want to save the forwards emails in some contact list so I'm saying what list in the following code: } else { $saving_list = $_POST['custom'] == 'FR' ? 148 : 147; So, what I'm actually doing is: } else { $saving_list = $_POST['custom'] == 'FR' ? 152

[PHP] call_user_func_array and bind_result

2011-12-16 Thread Mari Masuda
Hello, I am having trouble figuring out how to properly bind the results of a mysqli prepared statement using call_user_func_array. I have an "AbstractModel" abstract class and within the class is a method called "load" that takes the primary key of the desired item and retrieves and loads the

[PHP] Problems with CURL using an HTTP Proxy on PHP5

2011-12-16 Thread Francisco M. Marzoa Alonso
Hello, The following code is failing and I do not find the cause (please, note that checkurl value and CURLOPT_PROXY are NOT the real values I'm using, of course): $ch = curl_init(); $checkurl = 'http://mycheckhost.com/'; curl_setopt ($ch, CURLOPT_TIMEOUT, 6000); c

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Jim Lucas
On 12/16/2011 12:56 PM, DealTek wrote: >> >> >> what about creating a master report that has the total summarized by >> category and then offering a drill thru type structure to dig deeper >> in certain areas? > > > > - Hi Bastien, > > That's a cool idea. In this case they want it on a longer s

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Jim Lucas
On 12/16/2011 9:04 AM, Dave wrote: > Hi all, > > I need to create a year to date report with individual Subsummary > Report (ala filemaker / others?) headings for each month. So, I’m > curious the best way to approach this for performance speed and > flexibility etc. > > - I can do 1 sql query

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread DealTek
> > > what about creating a master report that has the total summarized by > category and then offering a drill thru type structure to dig deeper > in certain areas? - Hi Bastien, That's a cool idea. In this case they want it on a longer single page so they may save or print all at once. A

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Bastien Koert
On Fri, Dec 16, 2011 at 1:49 PM, DealTek wrote: >> >> >> I would give consideration to the 'group by' function for your query, and >> loop through that. > > Thanks Mike - will do... > > -- > > *beginner question* - what would we call this type of query/display: > > reporting or summary or

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread DealTek
> > > I would give consideration to the 'group by' function for your query, and > loop through that. Thanks Mike - will do... -- *beginner question* - what would we call this type of query/display: reporting or summary or ? I'm not sure what terms look up? it would be similar to que

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Mike Mackintosh
On Dec 16, 2011, at 12:04, Dave wrote: > Hi all, > > I need to create a year to date report with individual Subsummary > Report (ala filemaker / others?) headings for each month. So, I’m > curious the best way to approach this for performance speed and > flexibility etc. > > - I can do 1 sq

[PHP] Working on a Subsummary Report

2011-12-16 Thread Dave
Hi all, I need to create a year to date report with individual  Subsummary Report (ala filemaker / others?) headings for each month. So, I’m curious the best way to approach this for performance speed and flexibility etc. -  I can do 1 sql query for the whole year’s data - or 12 individual querie