Re: [PHP] syntax question

2013-07-10 Thread Jim Giner
Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax question

2013-07-10 Thread Přemysl Fiala
Hello, is an alternative syntax. http://php.net/manual/en/control-structures.alternative-syntax.php Premek. On Wed, 10 Jul 2013 13:15:22 +0200, Jim Giner wrote: Can someone tell me what this syntax is? I looked around but don't see any mention of it. while(condition) : (statement);

[PHP] syntax question

2013-07-10 Thread Jim Giner
Can someone tell me what this syntax is? I looked around but don't see any mention of it. while(condition) : (statement); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-27 Thread Tedd Sperling
On Aug 26, 2012, at 1:36 PM, Ashley Sheridan wrote: > Well, it turns out that I'm just an idiot... > -- > Thanks, > Ash That was easy -- anyone of us could have told you that. :-) Cheers, tedd PS: We all have our time in the barrel. _ t...@sperling.com http://sperling.com

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Ashley Sheridan
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote: > Can you tell us what is the error shown in browser or CLI? > > On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan > wrote: > > > I've just inherited some (pretty awful code) that I have to make some > > edits to, and came across a bit of a pr

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread tamouse mailing lists
On Sun, Aug 26, 2012 at 5:02 AM, Ashley Sheridan wrote: > > On Sun, 2012-08-26 at 04:36 -0500, tamouse mailing lists wrote: > > On Sat, Aug 25, 2012 at 9:56 PM, Ashley Sheridan > wrote: > > On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote: > > > >> Can you tell us what is the error shown in b

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Daniel Brown
On Sat, Aug 25, 2012 at 6:54 PM, Ashley Sheridan wrote: > I've just inherited some (pretty awful code) that I have to make some > edits to, and came across a bit of a problem. A lot of the code breaks > in and out of PHP and into HTML code: > > while(condition) > { > ?> > some html here > } > ?

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Ashley Sheridan
On Sun, 2012-08-26 at 09:21 -0300, Samuel Lopes Grigolato wrote: > Maybe you have a " allows short open tags? In production that setting could be disabled. > > > On Sun, Aug 26, 2012 at 9:20 AM, Ashley Sheridan > wrote: > > On Sun, 2012-08-26 at 11:02 +0100, Stuart Dallas wrote: >

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Samuel Lopes Grigolato
Maybe you have a "wrote: > On Sun, 2012-08-26 at 11:02 +0100, Stuart Dallas wrote: > > > On 26 Aug 2012, at 03:56, Ashley Sheridan > wrote: > > > > > Through the browser I get: > > > > > > Parse error: syntax error, unexpected $end > > > in /var/www/html/siteinquestion/index.php on line 356 > > >

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Ashley Sheridan
On Sun, 2012-08-26 at 11:02 +0100, Stuart Dallas wrote: > On 26 Aug 2012, at 03:56, Ashley Sheridan wrote: > > > Through the browser I get: > > > > Parse error: syntax error, unexpected $end > > in /var/www/html/siteinquestion/index.php on line 356 > > > > Through the CLI I get: > > > > PHP P

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Stuart Dallas
On 26 Aug 2012, at 03:56, Ashley Sheridan wrote: > Through the browser I get: > > Parse error: syntax error, unexpected $end > in /var/www/html/siteinquestion/index.php on line 356 > > Through the CLI I get: > > PHP Parse error: syntax error, unexpected $end in index.php on line 356 > > Pars

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread Ashley Sheridan
On Sun, 2012-08-26 at 04:36 -0500, tamouse mailing lists wrote: > On Sat, Aug 25, 2012 at 9:56 PM, Ashley Sheridan > wrote: > > On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote: > > > >> Can you tell us what is the error shown in browser or CLI? > >> > >> On Sun, Aug 26, 2012 at 5:54 AM, Ashl

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-26 Thread tamouse mailing lists
On Sat, Aug 25, 2012 at 9:56 PM, Ashley Sheridan wrote: > On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote: > >> Can you tell us what is the error shown in browser or CLI? >> >> On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan >> wrote: >> >> > I've just inherited some (pretty awful code) that

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Ashley Sheridan
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote: > Can you tell us what is the error shown in browser or CLI? > > On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan > wrote: > > > I've just inherited some (pretty awful code) that I have to make some > > edits to, and came across a bit of a pr

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Duken Marga
Can you tell us what is the error shown in browser or CLI? On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan wrote: > I've just inherited some (pretty awful code) that I have to make some > edits to, and came across a bit of a problem. A lot of the code breaks > in and out of PHP and into HTML cod

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Adam Richardson
On Sat, Aug 25, 2012 at 6:54 PM, Ashley Sheridan wrote: > I've just inherited some (pretty awful code) that I have to make some > edits to, and came across a bit of a problem. A lot of the code breaks > in and out of PHP and into HTML code: > > while(condition) > { > ?> > some html here > } > ?

[PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Ashley Sheridan
I've just inherited some (pretty awful code) that I have to make some edits to, and came across a bit of a problem. A lot of the code breaks in and out of PHP and into HTML code: some html here But when I check this my PHP parser is saying that this is a syntax error (checked in the browser an

RE: [PHP] syntax question

2012-02-07 Thread admin
> -Original Message- > From: ma...@behnke.biz [mailto:ma...@behnke.biz] > Sent: Tuesday, February 07, 2012 10:47 AM > To: php-general@lists.php.net; ad...@buskirkgraphics.com > Subject: Re: [PHP] syntax question > > > > ad...@buskirkgraphics.com hat

Re: [PHP] syntax question

2012-02-07 Thread ma...@behnke.biz
ad...@buskirkgraphics.com hat am 7. Februar 2012 um 15:11 geschrieben: > I have been struggling with this issue for an hour and honestly I am not > sure why. > > I consider myself to be pretty savvy with MySQL but I am running into an > syntax error that is just flat out eluding me. > > > > $qu

RE: [PHP] syntax question

2012-02-07 Thread admin
> -Original Message- > From: Louis Huppenbauer [mailto:louis.huppenba...@gmail.com] > Sent: Tuesday, February 07, 2012 9:24 AM > To: ad...@buskirkgraphics.com > Cc: php-general@lists.php.net > Subject: Re: [PHP] syntax question > > Generally... Wouldn'

Re: [PHP] syntax question

2012-02-07 Thread Louis Huppenbauer
Generally... Wouldn't grouping by an id (which is normally unique) have no real benefit... Except some strange behaviour? Just to clarify: Why aren't you sticking to the LIMIT 1? 2012/2/7 > I have been struggling with this issue for an hour and honestly I am not > sure why. > > I consider mysel

[PHP] syntax question

2012-02-07 Thread admin
I have been struggling with this issue for an hour and honestly I am not sure why. I consider myself to be pretty savvy with MySQL but I am running into an syntax error that is just flat out eluding me. $query = "SELECT `table2`.`name` from `table1` ,`table2` WHERE `table2`.`user_id`=`table1`.

Re: [PHP] Syntax problem PDO and bindvalue

2011-12-12 Thread Fatih P.
On Mon, Dec 12, 2011 at 4:22 PM, FeIn wrote: > I don't think you're suppose to end your queries with a semicolon. Try: > you can end your queries with semicolon in prepared statements. How can I see the prepared SQL statement before it is executed? try-> var_dump ($statement);

Re: [PHP] Syntax problem PDO and bindvalue

2011-12-12 Thread FeIn
I don't think you're suppose to end your queries with a semicolon. Try: $sql = "SELECT * FROM photographs WHERE photo_filename LIKE '%2%' LIMIT 0, :q"; On Mon, Dec 12, 2011 at 1:49 PM, Stephen wrote: > So I am getting this SQL error: > > Error selecting photographs: SQLSTATE[42000

Re: [PHP] Syntax problem PDO and bindvalue

2011-12-12 Thread Fatih P.
On 12/12/2011 01:49 PM, Stephen wrote: So I am getting this SQL error: Error selecting photographs: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '

[PHP] Syntax problem PDO and bindvalue

2011-12-12 Thread Stephen
So I am getting this SQL error: Error selecting photographs: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''4'' at line 2 My code is: function upd

Re: [PHP] PHP syntax - novice question

2011-10-29 Thread Phil Dobbin
On 30/10/11 at 01:18, si...@welsh.co.nz (Simon J Welsh) wrote: > It seems as though your editor has changed the normal quotes around > into "pretty" > quotes. Change the ‘s and ’s back to '. Hi, Simon. Thanks for that. Couldn’t see for looking... Cheers, Phil. -- Please consider the env

Re: [PHP] PHP syntax - novice question

2011-10-29 Thread Simon J Welsh
On 30/10/2011, at 1:15 PM, Phil Dobbin wrote: > Hi, all. > > I’m new to the list & PHP in general & have a syntax question. > > I have a script that calls both DB & MDB2. This is the part of the script > where the error occurs: > > ##

[PHP] PHP syntax - novice question

2011-10-29 Thread Phil Dobbin
Hi, all. I’m new to the list & PHP in general & have a syntax question. I have a script that calls both DB & MDB2. This is the part of the script where the error occurs: if($type == "DB") { $db = DB::connect($dsn)

Re: [PHP] Syntax Question

2011-08-03 Thread Gates, Jeff
On 8/3/11 10:41 AM, "ad...@buskirkgraphics.com" wrote: >> -Original Message- >> From: Gates, Jeff [mailto:gat...@si.edu] >> Sent: Wednesday, August 03, 2011 10:23 AM >> To: php-general@lists.php.net >> Subject: [PHP] Syntax Question >> &g

RE: [PHP] Syntax Question

2011-08-03 Thread admin
> -Original Message- > From: Gates, Jeff [mailto:gat...@si.edu] > Sent: Wednesday, August 03, 2011 10:23 AM > To: php-general@lists.php.net > Subject: [PHP] Syntax Question > > I, too, am a super newbie. I have a beginning knowledge of being able > to > &q

[PHP] Syntax Question

2011-08-03 Thread Gates, Jeff
<http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart.si.e du/images/$tmpImageDirectory/$artwork.accessionNumber_1a.jpg> " + $tmpImageDirectory + "/" + $accessionNumber + "_1ajpg"; That's as far as I've gotten. I don't know how to pu

Re: [PHP] Syntax Error

2010-10-04 Thread kranthi
As pointed out echo $insertSQl should help you locate many trivial problems. But using PDO will avoid these kind of problems -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Syntax Error

2010-10-04 Thread a...@ashleysheridan.co.uk
Switching to pdo won't necessarily remove sql errors any more than using a php framework will remove php errors. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "kranthi" Date: Mon, Oct 4, 2010 09:04 Subject: [PHP] Syntax Error To: Cc: "chris

Re: [PHP] Syntax Error

2010-10-03 Thread Ashley Sheridan
On Sun, 2010-10-03 at 13:14 -0400, chris h wrote: > On Sun, Oct 3, 2010 at 12:47 PM, Gary wrote: > > > I have just created a registration page using Webassist, and I am getting a > > syntax error that I am not understanding. Anyone be able to point me in > > the > > right direction? > > > > You

Re: [PHP] Syntax Error

2010-10-03 Thread chris h
On Sun, Oct 3, 2010 at 12:47 PM, Gary wrote: > I have just created a registration page using Webassist, and I am getting a > syntax error that I am not understanding. Anyone be able to point me in > the > right direction? > > You have an error in your SQL syntax; check the manual that correspond

[PHP] Syntax Error

2010-10-03 Thread Gary
I have just created a registration page using Webassist, and I am getting a syntax error that I am not understanding. Anyone be able to point me in the right direction? You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread Rick Dwyer
Hmm. OK with the help below, I am closer. The other fields on the page are getting passed via form fields that look like this: input type="text" value="" name="form[element9]" size="40" maxlength="255" so I added: input type="text" value="" name="form[my_id]" size="40" maxlength="255"

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread James McLean
On Thu, Feb 25, 2010 at 4:22 PM, Rick Dwyer wrote: > OK... external function... that would explain why I could not locate it. > > Let me get right to the problem I am having with this code as someone may be > able to help directly. > > I have a link on a page that opens a contact form.  The link i

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread viraj
if you do the redirection with header('Location: /mypage.php'), setting a variable on formcheck.php is not enough. if you modify the header('Location: /mypage.php') to.. header('Location: /mypage.php?my_id=5') it will take the variable to mypage.php as $_GET['my_id] you can not expect a variabl

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread Rick Dwyer
OK... external function... that would explain why I could not locate it. Let me get right to the problem I am having with this code as someone may be able to help directly. I have a link on a page that opens a contact form. The link is mypage.php?my_id=5 So on mypage.php, I capture this

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread Paul M Foster
On Thu, Feb 25, 2010 at 12:16:08AM -0500, Robert Cummings wrote: > Rick Dwyer wrote: >> Hello all. >> >> I'm trying to learn PHP on the fly and I have a line of code that >> contains syntax I can't find documented anywhere: >> >> php echo check('element8'); >> >> In the above line, can someone tel

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread Robert Cummings
Rick Dwyer wrote: Hello all. I'm trying to learn PHP on the fly and I have a line of code that contains syntax I can't find documented anywhere: php echo check('element8'); In the above line, can someone tell me what "check" means? In the above, check is a function. It is being called wi

[PHP] PHP Syntax Help - Check?

2010-02-24 Thread Rick Dwyer
Hello all. I'm trying to learn PHP on the fly and I have a line of code that contains syntax I can't find documented anywhere: php echo check('element8'); In the above line, can someone tell me what "check" means? Thank you. --Rick -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] syntax error in class

2010-02-10 Thread Eric Lee
2010/2/11 Jim Lucas > Dasn wrote: > >> I got the syntax error. Why? >> > > only constant literal is allowed. You can think that it is static complie but not on runtime . Regards, Eric, > Read the first paragraph on the following page. > > http://us3.php.net/manual/en/language.oop5.propertie

Re: [PHP] syntax error in class

2010-02-10 Thread Jim Lucas
Dasn wrote: I got the syntax error. Why? Read the first paragraph on the following page. http://us3.php.net/manual/en/language.oop5.properties.php [quote] ... This declaration may include an initialization, but this initialization must be a constant value--that is, it must be able to be eva

[PHP] syntax error in class

2010-02-10 Thread Dasn
Hello guys, I encountered a syntax error, and cannot figure out the reason, for example: == CODE == 1:'str1'.'str2'); 3:?> === Works fine, but when I try to put it into a class, say: ==

Re: [PHP] Syntax Snag need extra eyes

2009-07-16 Thread Jim Lucas
Bastien Koert wrote: > On Thu, Jul 16, 2009 at 12:43 PM, Andrew Ballard wrote: >> On Thu, Jul 16, 2009 at 12:35 PM, Jim Lucas wrote: >>> Andrew Ballard wrote: On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas wrote: >> [snip] > Also, this is the wrong way to use printf(). Please go read the m

Re: [PHP] Syntax Snag need extra eyes

2009-07-16 Thread Bastien Koert
On Thu, Jul 16, 2009 at 12:43 PM, Andrew Ballard wrote: > On Thu, Jul 16, 2009 at 12:35 PM, Jim Lucas wrote: >> >> Andrew Ballard wrote: >> > On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas wrote: > [snip] >> >> Also, this is the wrong way to use printf().  Please go read the manual >> >> page for th

Re: [PHP] Syntax Snag need extra eyes

2009-07-16 Thread Andrew Ballard
On Thu, Jul 16, 2009 at 12:35 PM, Jim Lucas wrote: > > Andrew Ballard wrote: > > On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas wrote: [snip] > >> Also, this is the wrong way to use printf().  Please go read the manual > >> page for this function. > >> > >> Try: > >> > >> printf( > >>        '%s%s',

Re: [PHP] Syntax Snag need extra eyes (RESOLVED)

2009-07-16 Thread Jim Lucas
Miller, Terion wrote: > Thanks Jim!! I did read the manual and don't get it, like why is printf used > and not echo...how do you decided which to use? > > > > On 7/16/09 11:25 AM, "Jim Lucas" wrote: > > printf( > '%s%s', > $row['name'], > $row['name'], > $row['

Re: [PHP] Syntax Snag need extra eyes

2009-07-16 Thread Jim Lucas
Andrew Ballard wrote: > On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas wrote: > >> Miller, Terion wrote: >>> I'm almost there with my little pagination script but now I'm hung on the >>> "Unexpected T_Variable" error...which in the past has been a semi-colon >>> missing so I'm not sure why this is t

Re: [PHP] Syntax Snag need extra eyes

2009-07-16 Thread Andrew Ballard
On Thu, Jul 16, 2009 at 12:25 PM, Jim Lucas wrote: > Miller, Terion wrote: > > I'm almost there with my little pagination script but now I'm hung on the > > "Unexpected T_Variable" error...which in the past has been a semi-colon > > missing so I'm not sure why this is throwing it...eyes please: >

Re: [PHP] Syntax Snag need extra eyes (RESOLVED)

2009-07-16 Thread Miller, Terion
Thanks Jim!! I did read the manual and don't get it, like why is printf used and not echo...how do you decided which to use? On 7/16/09 11:25 AM, "Jim Lucas" wrote: printf( '%s%s', $row['name'], $row['name'], $row['address'] ); -- PHP General Mailing List (ht

Re: [PHP] Syntax Snag need extra eyes

2009-07-16 Thread Jim Lucas
Miller, Terion wrote: > I'm almost there with my little pagination script but now I'm hung on the > "Unexpected T_Variable" error...which in the past has been a semi-colon > missing so I'm not sure why this is throwing it...eyes please: > > printf(' href="view.php?name=$row['name']">%s%s',$row['n

RE: [PHP] Syntax Snag need extra eyes

2009-07-16 Thread Bob McConnell
From: Miller, Terion > I'm almost there with my little pagination script but now I'm hung on the > "Unexpected T_Variable" error...which in the past has been a semi-colon > missing so I'm not sure why this is throwing it...eyes please: > > printf(' href="view.php?name=$row['name']">%s%s',$row['n

[PHP] Syntax Snag need extra eyes

2009-07-16 Thread Miller, Terion
I'm almost there with my little pagination script but now I'm hung on the "Unexpected T_Variable" error...which in the past has been a semi-colon missing so I'm not sure why this is throwing it...eyes please: printf('%s%s',$row['name'] ,$row['address']); -- PHP General Mailing List (http://www.

Re: [PHP] syntax woes

2009-04-03 Thread Shawn McKenzie
Chris wrote: > Shawn McKenzie wrote: >> Chris wrote: Wow, it does chown and chmod as well, thats friggen cool. >>> chown will only work if the script is running as root which I doubt your >>> drupal site will be. >>> >> >> Or if the script is running as a user/group that has write permissions

Re: [PHP] syntax woes

2009-04-03 Thread Michael A. Peters
Jan G.B. wrote: you don't need the "ugly" . " " . "string" . "merging". um, I guess most of my code is ugly ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax woes

2009-04-03 Thread Jan G.B.
2009/4/3 : > Hi all, > > For any one following this thread, here is how I worked around the > apache/php/chown limitation. > > script snippet (and if any one has a more elegant style, please share as I > am an amateur script kiddie). > > $path = "/homes".$username; > $chowncmd = "/usr/bin/sudo /bi

Re: [PHP] syntax woes

2009-04-02 Thread aurfalien
Hi all, For any one following this thread, here is how I worked around the apache/php/chown limitation. script snippet (and if any one has a more elegant style, please share as I am an amateur script kiddie). $path = "/homes".$username; $chowncmd = "/usr/bin/sudo /bin/chown "; mkdir($path

Re: [PHP] syntax woes

2009-04-02 Thread Michael A. Peters
Chris wrote: Shawn McKenzie wrote: Chris wrote: Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. Or if the script is running as a user/group that has write permissions to the dir/file that

Re: [PHP] syntax woes

2009-04-02 Thread Chris
Shawn McKenzie wrote: Chris wrote: Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. Or if the script is running as a user/group that has write permissions to the dir/file that your trying t

Re: [PHP] syntax woes

2009-04-02 Thread Shawn McKenzie
Chris wrote: > >> Wow, it does chown and chmod as well, thats friggen cool. > > chown will only work if the script is running as root which I doubt your > drupal site will be. > Or if the script is running as a user/group that has write permissions to the dir/file that your trying to chown. --

Re: [PHP] syntax woes

2009-04-02 Thread Chris
Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] syntax woes

2009-04-02 Thread aurfalien
On Thu, 2009-04-02 at 15:58 -0700, aurfal...@gmail.com wrote: On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote: aurfal...@gmail.com wrote: Hi all, I'm unsure how to describe this but I'll try. The following code works fine in its own PHP script; $mkdircmd = '/bin/mkdir /homes/'.$uid

Re: [PHP] syntax woes

2009-04-02 Thread Ashley Sheridan
On Thu, 2009-04-02 at 15:58 -0700, aurfal...@gmail.com wrote: > > On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote: > >>> aurfal...@gmail.com wrote: > Hi all, > I'm unsure how to describe this but I'll try. > The following code works fine in its own PHP script; > $mk

Re: [PHP] syntax woes

2009-04-02 Thread aurfalien
On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote: aurfal...@gmail.com wrote: Hi all, I'm unsure how to describe this but I'll try. The following code works fine in its own PHP script; $mkdircmd = '/bin/mkdir /homes/'.$uid; exec($mkdircmd); But when placed in a larger PHP script being

Re: [PHP] syntax woes

2009-04-02 Thread Ashley Sheridan
On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote: > > aurfal...@gmail.com wrote: > >> Hi all, > >> I'm unsure how to describe this but I'll try. > >> The following code works fine in its own PHP script; > >> $mkdircmd = '/bin/mkdir /homes/'.$uid; > >> exec($mkdircmd); > >> But when plac

Re: [PHP] syntax woes

2009-04-02 Thread aurfalien
aurfal...@gmail.com wrote: Hi all, I'm unsure how to describe this but I'll try. The following code works fine in its own PHP script; $mkdircmd = '/bin/mkdir /homes/'.$uid; exec($mkdircmd); But when placed in a larger PHP script being part of the ldap_provisioning module in Drupal, the Drupal G

Re: [PHP] syntax woes

2009-04-02 Thread Chris
aurfal...@gmail.com wrote: Hi all, I'm unsure how to describe this but I'll try. The following code works fine in its own PHP script; $mkdircmd = '/bin/mkdir /homes/'.$uid; exec($mkdircmd); But when placed in a larger PHP script being part of the ldap_provisioning module in Drupal, the Drupa

[PHP] syntax woes

2009-04-02 Thread aurfalien
Hi all, I'm unsure how to describe this but I'll try. The following code works fine in its own PHP script; $mkdircmd = '/bin/mkdir /homes/'.$uid; exec($mkdircmd); But when placed in a larger PHP script being part of the ldap_provisioning module in Drupal, the Drupal GUI is blank until I do;

Re: [PHP] Syntax checker? Character replacing

2009-03-06 Thread Adam
just clean up your code and it will work: http://www.google.ca/search?hl=en&q=php+rocks%21%21%21&meta='; if (isset($qString)) { $buffer = str_replace("&","&",$qString); } echo $buffer."\n"; ?> OUTPUT: C:\>php test.php http://www.google.ca/search?hl=en&q=php+rocks%21%21%21&meta= C:\> On F

Re: [PHP] Syntax checker? Character replacing

2009-03-06 Thread haliphax
On Fri, Mar 6, 2009 at 2:05 PM, Terion Miller wrote: > I have this and think maybe something is off, because if there is an amp (&) > in the location then it only displays a comma , and nothing else: > > if (isset($_SERVER['QUERY_STRING'])) {$Page .= ($_SERVER['QUERY_STRING']? > '?'. str_replace("

[PHP] Syntax checker? Character replacing

2009-03-06 Thread Terion Miller
I have this and think maybe something is off, because if there is an amp (&) in the location then it only displays a comma , and nothing else: if (isset($_SERVER['QUERY_STRING'])) {$Page .= ($_SERVER['QUERY_STRING']? '?'. str_replace("&","&",$_SERVER['QUERY_STRING']) : '');} is that wrong?

Re: [PHP] syntax

2009-02-25 Thread Rick Duval
WHERE date >= DATE_SUB(NOW(), INTERVAL 7 DAY) Works just fine for me. R On Tue, Feb 24, 2009 at 4:15 PM, Terion Miller wrote: > Need syntax help when it comes to using a timestamp. > What I'm trying to say in my query WHERE clause is to select records if the > timestamp on the record is in t

Re: [PHP] syntax

2009-02-25 Thread Ashley Sheridan
On Wed, 2009-02-25 at 07:17 -0600, Terion Miller wrote: > > > >> > >> SELECT something FROM tbl_name > >>-> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col; > >> > >> Taking that and changing it so it works for you would result in the > >> following. > >> > >> $query .= " WHERE DATE_SUB(C

Re: [PHP] syntax

2009-02-25 Thread Terion Miller
> >> >> SELECT something FROM tbl_name >>-> WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col; >> >> Taking that and changing it so it works for you would result in the >> following. >> >> $query .= " WHERE DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= `stamp`"; >> >> Try that and let us know your

Re: [PHP] syntax

2009-02-24 Thread Jim Lucas
Jim Lucas wrote: Terion Miller wrote: Nobody has asked to confirm, but what format is `stamp`? Unix Timestamp, MySQL Timestamp, MySQL Date stamp??? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II,

Re: [PHP] syntax

2009-02-24 Thread Jim Lucas
Terion Miller wrote: Nobody has asked to confirm, but what format is `stamp`? Unix Timestamp, MySQL Timestamp, MySQL Date stamp??? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by Will

Re: [PHP] syntax

2009-02-24 Thread Michael A. Peters
Micah Gersten wrote: $query .= " WHERE stamp < ".(time()-7*3600*24); Using something like that is disastrous for DST and Leap Seconds... That's why you use UTC for servers and translate to local time when you need to display it. Not sure that solves the leap second issue, but it certa

Re: [PHP] syntax

2009-02-24 Thread Chris
Micah Gersten wrote: Martin Zvarík wrote: Chris napsal(a): Terion Miller wrote: Need syntax help when it comes to using a timestamp. What I'm trying to say in my query WHERE clause is to select records if the timestamp on the record is in the past 7 days from NOW() $query .= " WHERE stamp < N

Re: [PHP] syntax

2009-02-24 Thread Martin Zvarík
Micah Gersten napsal(a): Martin Zvarík wrote: Chris napsal(a): Terion Miller wrote: Need syntax help when it comes to using a timestamp. What I'm trying to say in my query WHERE clause is to select records if the timestamp on the record is in the past 7 days from NOW() $query .

Re: [PHP] syntax

2009-02-24 Thread Micah Gersten
Martin Zvarík wrote: > Chris napsal(a): >> Terion Miller wrote: >>> Need syntax help when it comes to using a timestamp. >>> What I'm trying to say in my query WHERE clause is to select records >>> if the >>> timestamp on the record is in the past 7 days from NOW() >>> >>> $query .= " WHERE stamp <

Re: [PHP] syntax

2009-02-24 Thread Terion Miller
> > Nobody has asked to confirm, but what format is `stamp`? > > Unix Timestamp, MySQL Timestamp, MySQL Date stamp??? > > -- > Jim Lucas > > "Some men are born to greatness, some achieve greatness, > and some have greatness thrust upon them." > > Twelfth Night, Act II, Scene V >by Willi

Re: [PHP] syntax

2009-02-24 Thread Jim Lucas
Terion Miller wrote: > Need syntax help when it comes to using a timestamp. > What I'm trying to say in my query WHERE clause is to select records if the > timestamp on the record is in the past 7 days from NOW() > > $query .= " WHERE stamp < NOW()-7 "; I have no clue here on this > > the l

Re: [PHP] syntax

2009-02-24 Thread Martin Zvarík
Chris napsal(a): Terion Miller wrote: Need syntax help when it comes to using a timestamp. What I'm trying to say in my query WHERE clause is to select records if the timestamp on the record is in the past 7 days from NOW() $query .= " WHERE stamp < NOW()-7 "; I have no clue here on this ...

Re: [PHP] syntax

2009-02-24 Thread Terion Miller
> Has nothing at all to do with php. > > http://dev.mysql.com/doc/refman/5.0/en/datetime.html > http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html > > Yeah guess I posted to the wrong list should of been on the php-db list maybe but thanks for the suggestions Marc I'll be trying yo

Re: [PHP] syntax

2009-02-24 Thread Chris
Terion Miller wrote: Need syntax help when it comes to using a timestamp. What I'm trying to say in my query WHERE clause is to select records if the timestamp on the record is in the past 7 days from NOW() $query .= " WHERE stamp < NOW()-7 "; I have no clue here on this the lay language

Re: [PHP] syntax

2009-02-24 Thread Marc Steinert
Marc Steinert wrote: Terion Miller wrote: $query .= " WHERE stamp < NOW()-7 "; I have no clue here on this Try $query .= " WHERE stamp < SUBDATE(NOW(), INTERVAL -7 DAY)"; instead. Marc Damn, hit the send-button too fast. Replace -7 with 7. Sry for spamming the list. -- http://bi

Re: [PHP] syntax

2009-02-24 Thread Marc Steinert
Terion Miller wrote: $query .= " WHERE stamp < NOW()-7 "; I have no clue here on this Try $query .= " WHERE stamp < SUBDATE(NOW(), INTERVAL -7 DAY)"; instead. Marc -- http://bithub.net/ Synchronize and share your files over the web for free My Twitter feed http://twitter.com/MarcS

Re: [PHP] syntax

2009-02-24 Thread Ashley Sheridan
On Tue, 2009-02-24 at 15:15 -0600, Terion Miller wrote: > Need syntax help when it comes to using a timestamp. > What I'm trying to say in my query WHERE clause is to select records if the > timestamp on the record is in the past 7 days from NOW() > > $query .= " WHERE stamp < NOW()-7 "; I have n

[PHP] syntax

2009-02-24 Thread Terion Miller
Need syntax help when it comes to using a timestamp. What I'm trying to say in my query WHERE clause is to select records if the timestamp on the record is in the past 7 days from NOW() $query .= " WHERE stamp < NOW()-7 "; I have no clue here on this the lay language is WHERE stamp is with

Re: [PHP] syntax error (stumped)

2008-12-05 Thread Daniel Brown
On Fri, Dec 5, 2008 at 1:31 AM, ddg2sailor <[EMAIL PROTECTED]> wrote: > > Its begining to look like this code was written for a newer sql [snip!] Negative. It's either a custom function or was written incorrectly in the first place. There's never been a native PHP function `do_mysql_quer

Re: [PHP] syntax error (stumped)

2008-12-04 Thread ddg2sailor
Its begining to look like this code was written for a newer sql The sysop came up with an older php file that fixxed this issue Samples enclosed. //the file I been working on all days - relevant lines only" $filename = sqlesc($filename); $res = do_mysql_query("SELECT * FROM dox WHERE fi

Re: [PHP] syntax error (stumped)

2008-12-04 Thread Chris
ddg2sailor wrote: I have been looking at this code all night and at one point I drew the same conclusion. But I havent been able to find it Il beg the moderators indulgence here.. But I really do need to add this code which calls the other code as a user hits a link. Find the file where do_

Re: [PHP] syntax error (stumped)

2008-12-04 Thread ddg2sailor
I have been looking at this code all night and at one point I drew the same conclusion. But I havent been able to find it Il beg the moderators indulgence here.. But I really do need to add this code which calls the other code as a user hits a link. //dox.php// 0) stderr("Error", "A file wi

Re: [PHP] syntax error (stumped)

2008-12-04 Thread Nathan Nobbe
On Thu, Dec 4, 2008 at 6:44 PM, ddg2sailor <[EMAIL PROTECTED]> wrote: > > Sorry , I did mean to mention that... But I forgot. > > The original error is : > > Fatal error: Call to undefined function do_mysql_query() in > C:\xampp\htdocs\getdox.php on line 18 likely something to do w/ do_mysql_que

Re: [PHP] syntax error (stumped)

2008-12-04 Thread ddg2sailor
Sorry , I did mean to mention that... But I forgot. The original error is : Fatal error: Call to undefined function do_mysql_query() in C:\xampp\htdocs\getdox.php on line 18 Something to do with this // or sqlerr(); //? Thanks Daniel P. Brown-2 wrote: > > On Thu, Dec 4, 2008 at 8:32 PM,

Re: [PHP] syntax error (stumped)

2008-12-04 Thread Daniel P. Brown
On Thu, Dec 4, 2008 at 8:32 PM, ddg2sailor <[EMAIL PROTECTED]> wrote: > > This is acctualy a very simple code... But I dont know exactly what to do > with line 18. It looks to be taking something from dox and redefining it as > RES. There is some related code but with syntax is pretty much has to b

  1   2   3   4   >