Re: [PHP] any security issues with this mysql_update function?

2012-01-13 Thread Tommy Pham
On Fri, Jan 13, 2012 at 7:52 PM, Haluk Karamete wrote: > I wrote a function "sql_update" which takes a $db_name, a $table_name, > a $where and finally a $data array where data is authored by using an > associative array which allows easy the pairing of field names and > field values. > > This is h

[PHP] any security issues with this mysql_update function?

2012-01-13 Thread Haluk Karamete
I wrote a function "sql_update" which takes a $db_name, a $table_name, a $where and finally a $data array where data is authored by using an associative array which allows easy the pairing of field names and field values. This is how I build the data array; $data = array( 'FirstName' => 'Joh

Re: [PHP] advise needed on a mysql select library function

2012-01-13 Thread Bastien
On 2012-01-13, at 2:18 PM, Haluk Karamete wrote: > Why discover the wheel, where there are so many qualified pros are > here that pick up their brains... > > I'm building a php library of functions, I mean day to day functions > that eases my RAD. > > Since I am new to PHP, I'm trying to wrap

Re: [PHP] how do you fund out if a mysql resource is empty?

2012-01-13 Thread Stuart Dallas
On 13 Jan 2012, at 20:01, Haluk Karamete wrote: > $result = mysql_query($sql,$link) or die(mysql_error()); > > how do you find out if $sql returned any recordsets? > is there a fast/super efficient way of finding this out... something > along the lines of is_empty($result) type thing? if (mys

[PHP] how do you fund out if a mysql resource is empty?

2012-01-13 Thread Haluk Karamete
$result = mysql_query($sql,$link) or die(mysql_error()); how do you find out if $sql returned any recordsets? is there a fast/super efficient way of finding this out... something along the lines of is_empty($result) type thing? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: advise needed on a mysql select library function

2012-01-13 Thread Haluk Karamete
I'm leaning towards this; function bp_select($db_name,$sql,&$result) { bp_conn($db_name,$db_server,$db_username,$db_pass); //with that, I pass the $db_name and the rest gets byRef'ed by the bp_conn! and I keep the bp_conn in a sep. file $link = mysql_connect($db_server,

[PHP] advise needed on a mysql select library function

2012-01-13 Thread Haluk Karamete
Why discover the wheel, where there are so many qualified pros are here that pick up their brains... I'm building a php library of functions, I mean day to day functions that eases my RAD. Since I am new to PHP, I'm trying to wrap php's built-in-functions and funtionalities into new function name

RE: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread David Savage
thanks for your assistance. From: Tim Streater [mailto:t...@clothears.org.uk] Sent: Fri 1/13/2012 9:37 AM To: David Savage Cc: PHP General List Subject: Re: RE: RE: [PHP] passing variables to php script On 13 Jan 2012 at 15:05, David Savage wrote: > I open th

Re: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread Curtis Maurand
Tim Streater wrote: > On 13 Jan 2012 at 15:05, David Savage wrote: > >> I open the html file up from a windows explorer window (Q:\asterisk\), >> and so >> IE opens it up, but the problem lies in the fact that I cannot find >> apache >> service running in the background...haven't figured out wh

Re: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread Curtis Maurand
Make sure IIS is not running. That'll cause all kinds of trouble. Tim Streater wrote: > On 13 Jan 2012 at 15:05, David Savage wrote: > >> I open the html file up from a windows explorer window (Q:\asterisk\), >> and so >> IE opens it up, but the problem lies in the fact that I cannot find >>

Re: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread Tim Streater
On 13 Jan 2012 at 15:05, David Savage wrote: > I open the html file up from a windows explorer window (Q:\asterisk\), and so > IE opens it up, but the problem lies in the fact that I cannot find apache > service running in the background...haven't figured out why yet. The "test > configuration"

Re: [PHP] advise on simplfying session usage

2012-01-13 Thread David Courtin
In a session context with a lot of session vars, you can use magic methods __set and __get : class s{ private function __set($property, $value){ $_SESSION[$property] = $value ; } private function __get($property){ return $_SESSION[$property