Re: [PHP] mysql case statement

2010-06-27 Thread Brandon Rampersad
no On Sun, Jun 27, 2010 at 8:29 PM, David McGlone wrote: > On Sunday 27 June 2010 04:08:24 Tanel Tammik wrote: > > Hello, > > > > how to select only if value is present? > > > > $query = $db->query("select menus.id, menus.name, > > case > > when panels.id is not null then '1' >

Re: [PHP] mysql case statement

2010-06-27 Thread David McGlone
On Sunday 27 June 2010 04:08:24 Tanel Tammik wrote: > Hello, > > how to select only if value is present? > > $query = $db->query("select menus.id, menus.name, > case > when panels.id is not null then '1' > end as hiddenpanel > > from " . \DB_MENUS . " as menus >

RE: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Alice Wei
Subject: RE: [PHP] Modifying Existing Text File From PHP Is Not Working From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: tedd.sperl...@gmail.com; php-general@lists.php.net Date: Sun, 27 Jun 2010 17:29:05 +0100 On Sun, 2010-06-27 at 12:23 -0400, Alice Wei wrote: Subject:

RE: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Ashley Sheridan
On Sun, 2010-06-27 at 12:23 -0400, Alice Wei wrote: > > Subject: RE: [PHP] Modifying Existing Text File From PHP Is Not Working > From: a...@ashleysheridan.co.uk > To: aj...@alumni.iu.edu > CC: tedd.sperl...@gmail.com; php-general@lists.php.net > Date: Sun, 27 Jun 2010 17:16:04 +0100 > > > >

RE: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Alice Wei
Subject: RE: [PHP] Modifying Existing Text File From PHP Is Not Working From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: tedd.sperl...@gmail.com; php-general@lists.php.net Date: Sun, 27 Jun 2010 17:16:04 +0100 On Sun, 2010-06-27 at 12:11 -0400, Alice Wei wrote: > Date:

RE: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Ashley Sheridan
On Sun, 2010-06-27 at 12:11 -0400, Alice Wei wrote: > > > Date: Sun, 27 Jun 2010 12:01:50 -0400 > > To: aj...@alumni.iu.edu; php-general@lists.php.net > > From: tedd.sperl...@gmail.com > > Subject: Re: [PHP] Modifying Existing Text File From PHP Is Not Working > > > > At 7:20 AM -0400 6/27/10, A

RE: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Alice Wei
> Date: Sun, 27 Jun 2010 12:01:50 -0400 > To: aj...@alumni.iu.edu; php-general@lists.php.net > From: tedd.sperl...@gmail.com > Subject: Re: [PHP] Modifying Existing Text File From PHP Is Not Working > > At 7:20 AM -0400 6/27/10, Alice Wei wrote: > >Hi, > > > >I have the code as in the following:

RE: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Alice Wei
> Subject: Re: [PHP] Modifying Existing Text File From PHP Is Not Working > From: lexsi...@gmail.com > Date: Sun, 27 Jun 2010 13:47:53 +0200 > To: aj...@alumni.iu.edu > > You are closing your file too early. Close it outside the foreach. > An other point : you should not 'edit' an XML file by thi

Re: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread tedd
At 7:20 AM -0400 6/27/10, Alice Wei wrote: Hi, I have the code as in the following: $string = "\n" . $name . "\n" . $phone . "\n". $email . "\n" . $comments . "\n"; //If file exists. append, otherwise create $file = "messages.xml"; $fh = fopen($file,"a"); $lines = file($file); /

[PHP] Brandon Rampersad wants to chat

2010-06-27 Thread Brandon Rampersad
--- Brandon Rampersad wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-b89a7a894d-a89de444ea-qNA2NPWwf-0ll8Gz7bfGZh8MgfI Y

Re: [PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Ashley Sheridan
On Sun, 2010-06-27 at 07:20 -0400, Alice Wei wrote: > Hi, > > I have the code as in the following: > > > $name= "Test"; > $phone= "123-456-7890"; > $email = "myem...@mymail.com"; > $comments = "Test Only"; > > $string = "\n" . $name . "\n" . $phone . > "\n". > $email . "\n" . $c

[PHP] Modifying Existing Text File From PHP Is Not Working

2010-06-27 Thread Alice Wei
Hi, I have the code as in the following: \n" . $name . "\n" . $phone . "\n". $email . "\n" . $comments . "\n"; //If file exists. append, otherwise create $file = "messages.xml"; $fh = fopen($file,"a"); $lines = file($file); //Output a line of the file until the end is reached fo

[PHP] mysql case statement

2010-06-27 Thread Tanel Tammik
Hello, how to select only if value is present? $query = $db->query("select menus.id, menus.name, case when panels.id is not null then '1' end as hiddenpanel from " . \DB_MENUS . " as menus left join " . \DB_HIDDENPANELS . " as panels on (menus.id = panels.men