[PHP] setting the document root path in linux

2007-09-19 Thread tbt
Hi I'm a newbie to php and I'm using require_once($_SERVER['DOCUMENT_ROOT']./includes/class.announcement.php); to import pages in php. This works fine on a windows environment. However when I move this application to a linux environment the files dont get imported properly. This is

Re: [PHP] setting the document root path in linux

2007-09-19 Thread Chris
tbt wrote: Hi I'm a newbie to php and I'm using require_once($_SERVER['DOCUMENT_ROOT']./includes/class.announcement.php); to import pages in php. This works fine on a windows environment. However when I move this application to a linux environment the files dont get imported properly.

[PHP] back on bug 42065 , strange behavior with ArrayObject

2007-09-19 Thread Julien Pauli
Hi, at first, read that bug report : http://bugs.php.net/bug.php?id=42065 I would like to say that it doesn't seem to be fixed as it's said. When I execute the bug 42065 test case, it still fails. In reality, another code brought me to that bug, please consider this : ?php class a { public

Re: [PHP] back on bug 42065 , strange behavior with ArrayObject

2007-09-19 Thread Chris
Julien Pauli wrote: Hi, at first, read that bug report : http://bugs.php.net/bug.php?id=42065 I would like to say that it doesn't seem to be fixed as it's said. When I execute the bug 42065 test case, it still fails. In reality, another code brought me to that bug, please consider this :

Re: [PHP] back on bug 42065 , strange behavior with ArrayObject

2007-09-19 Thread Julien Pauli
Wow, all right ; that's why casting to (array) before passing the variable , thus making a copy of it, works. Thanks for that short but effective answer ;-) However, except in the comments, this is not said in the original doc. It should be written ArrayObject ArrayObject::__construct ( mixed

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-19 Thread Rodolfo De Nadai
Hello James, in future we will implement the script with cron, i've already talk to the support server guys... and i think this would be the best pratice... But for now i was wondering if there's a workaround... because in the moment my boss tell me to not change anything that could delay the

[PHP] Undefined class constant

2007-09-19 Thread Puiu Hrenciuc
Hi everyone, I'm having a hard time dealing with an error that appeared overnight in one of my PHP script: Fatal error: Undefined class constant 'self::TYPE_HIDDEN' in /#/classes/framework/HTML/HTMLForm.php on line 120 HTMLForm.php snippet: . // Creates the HTMLFormFields

Re: [PHP] Undefined class constant

2007-09-19 Thread T . Lensselink
On Wed, 19 Sep 2007 15:56:22 +0300, Puiu Hrenciuc [EMAIL PROTECTED] wrote: Hi everyone, I'm having a hard time dealing with an error that appeared overnight in one of my PHP script: Fatal error: Undefined class constant 'self::TYPE_HIDDEN' in /#/classes/framework/HTML/HTMLForm.php

[PHP] Page Numbering

2007-09-19 Thread Dan Shirah
Hello all, I am having a problem with trying to display a set amount of records from my result. I have verified that the correct values for my variables are being passed to the query. The calculation for the records that should be displayed per page is correct. The total number of records

Re: [PHP] Undefined class constant

2007-09-19 Thread Puiu Hrenciuc
Here are the content for all used variables: $_this-Name: (string) FilterForm $_column: StringColumn Object ( [Table] = Roles [Name] = RoleName [Function] = like [Type] = 4 [Min] = [Max] = [RegEx] = [AllowedValues] = Array ( ) [IsValid] =

Re: [PHP] Page Numbering

2007-09-19 Thread T . Lensselink
On Wed, 19 Sep 2007 10:05:40 -0400, Dan Shirah [EMAIL PROTECTED] wrote: Hello all, I am having a problem with trying to display a set amount of records from my result. I have verified that the correct values for my variables are being passed to the query. The calculation for the records

Re: [PHP] Page Numbering

2007-09-19 Thread Dan Shirah
Becase I am using MSSQL not MYSQL. MSSQL does not have anything easy to use like LIMIT in MYSQL. So, to achieve the same functionality you have to use the subqueries. Having the largest number as the inner most subquery value tells the query to retrieve the records that are equal to that number

Re: [PHP] Page Numbering

2007-09-19 Thread T . Lensselink
On Wed, 19 Sep 2007 10:23:58 -0400, Dan Shirah [EMAIL PROTECTED] wrote: Becase I am using MSSQL not MYSQL. MSSQL does not have anything easy to use like LIMIT in MYSQL. So, to achieve the same functionality you have to use the subqueries. Having the largest number as the inner most

Re: [PHP] Undefined class constant

2007-09-19 Thread T . Lensselink
On Wed, 19 Sep 2007 17:13:02 +0300, Puiu Hrenciuc [EMAIL PROTECTED] wrote: Here are the content for all used variables: $_this-Name: (string) FilterForm $_column: StringColumn Object ( [Table] = Roles [Name] = RoleName [Function] = like [Type] = 4 [Min] =

Re: [PHP] setting the document root path in linux

2007-09-19 Thread Jim Lucas
tbt wrote: Hi I'm a newbie to php and I'm using require_once($_SERVER['DOCUMENT_ROOT']./includes/class.announcement.php); to import pages in php. This works fine on a windows environment. However when I move this application to a linux environment the files dont get imported properly.

Re: [PHP] Undefined class constant

2007-09-19 Thread Puiu Hrenciuc
Here is the HTMLFormField constructor, it is pretty simple : /** * Creates a new HTMLFormField object * * @param string $_formName Name of the form this field belongs to * @param Column $_column Record object this column derives from * @param int

Re: [PHP] Page Numbering

2007-09-19 Thread Dan Shirah
Actually, the query you mentioned will select records 11-20 because it counts 10 records backwards starting with record 20. print_r($result) onyl returns Resource id #3 and not the actual data. On 9/19/07, T. Lensselink [EMAIL PROTECTED] wrote: On Wed, 19 Sep 2007 10:23:58 -0400, Dan Shirah

Re: [PHP] Page Numbering

2007-09-19 Thread Dan Shirah
That gives me an array of the 10 records that are being displayed every single time. It's like even though the variables in my query are changing correctly from 0,10 to 10,20; the records being displayed are not updating. The URL is reflecting the changes from page 1 to 2 correctly also. On

Re: [PHP] Page Numbering

2007-09-19 Thread Dan Shirah
I have my query echoing out. Upon initial display it looks like this: SELECT DISTINCT * FROM ( SELECT TOP 10 Value1, Value2 FROM ( SELECT TOP 10 Value1, Value2 FROM my_table WHERE my_table.column = 'P' ) as newtbl order by PKEY desc ) as newtbl2 order by PKEY asc And then when I click on the

Re: [PHP] Page Numbering

2007-09-19 Thread Ben
I found the easiest solution is to use the 'Pager' package in pear http://pear.php.net/package/Pager Ben On Wednesday 19 Sep 2007 15:45, T.Lensselink wrote: On Wed, 19 Sep 2007 10:23:58 -0400, Dan Shirah [EMAIL PROTECTED] wrote: Becase I am using MSSQL not MYSQL. MSSQL does not have anything

Re: [PHP] Page Numbering

2007-09-19 Thread T . Lensselink
On Wed, 19 Sep 2007 10:48:20 -0400, Dan Shirah [EMAIL PROTECTED] wrote: Actually, the query you mentioned will select records 11-20 because it counts 10 records backwards starting with record 20. print_r($result) onyl returns Resource id #3 and not the actual data. On 9/19/07, T.

Re: [PHP] Page Numbering

2007-09-19 Thread Zoltán Németh
2007. 09. 19, szerda keltezéssel 11.08-kor Dan Shirah ezt írta: I have my query echoing out. Upon initial display it looks like this: SELECT DISTINCT * FROM ( SELECT TOP 10 Value1, Value2 FROM ( SELECT TOP 10 Value1, Value2 FROM my_table WHERE my_table.column = 'P' ) as newtbl order by PKEY

Re: [PHP] Page Numbering

2007-09-19 Thread Jim Lucas
Dan Shirah wrote: Hello all, I am having a problem with trying to display a set amount of records from my result. I have verified that the correct values for my variables are being passed to the query. The calculation for the records that should be displayed per page is correct. The total

Re: [PHP] Finding next recored in a array

2007-09-19 Thread tedd
At 11:52 AM -0400 9/17/07, brian wrote: tedd wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the script that

Re: [PHP] Page Numbering

2007-09-19 Thread Dan Shirah
Whenever the query has the NOT IN included in it, I get the following error: Warning: mssql_query() [function.mssql-queryhttp://develop1/credit%20card%20processing/Process/function.mssql-query]: message: Incorrect syntax near the keyword 'as'. (severity 15) On 9/19/07, Jim Lucas [EMAIL

Re: [PHP] Page Numbering

2007-09-19 Thread Jim Lucas
Dan Shirah wrote: Whenever the query has the NOT IN included in it, I get the following error: Warning: mssql_query() [function.mssql-queryhttp://develop1/credit%20card%20processing/Process/function.mssql-query]: message: Incorrect syntax near the keyword 'as'. (severity 15) ?php # Get page

[PHP] [SOLVED] Page Numbering

2007-09-19 Thread Dan Shirah
Awesome. I just had to modify the outter query: $SQL = SELECT TOP {$max_results} Value1, Value2 FROMmy_table WHERE credit_card_id NOT IN ( To read: $SQL = SELECT TOP {$max_results} Value1, Value2 FROMmy_table WHERE

Re: [PHP] [SOLVED] Page Numbering

2007-09-19 Thread Jim Lucas
Dan Shirah wrote: Awesome. I just had to modify the outter query: $SQL = SELECT TOP {$max_results} Value1, Value2 FROMmy_table WHERE credit_card_id NOT IN ( To read: $SQL = SELECT TOP {$max_results} Value1, Value2 FROMmy_table

[PHP] Format_number and input_object_tag

2007-09-19 Thread Augusto Morais
Hi, I have 2 problems. First: When an user type a number that have comma the numbers after of comma doesnt safe. example: the user wants save the number: 10,85 I dont know but the symfony just save the number 10. The 85 is ignored. How i fix it ? Second problem: i'm trying format

Re: [PHP] Finding next recored in a array

2007-09-19 Thread brian
tedd wrote: At 11:52 AM -0400 9/17/07, brian wrote: tedd wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do not understand is if I know the last number was say 5 how do I tell the

[PHP] Open New URL window

2007-09-19 Thread Andrew Prostko
I am new to PHP and to email lists so I apologize in advance. What I am trying to do is to take a password from user input, check it to make sure it is == to something, say “burgers” My problem is, I do not know how to make the Else statement... How do I

RE: [PHP] Page Numbering

2007-09-19 Thread Andrew Wilson
What do I have to do to get off this list. Murder someone? Please take me off the list as I have already tried to unsubscribe several times. The email is registered under [EMAIL PROTECTED] -Original Message- From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 20, 2007

Re: [PHP] Page Numbering

2007-09-19 Thread Jim Lucas
Andrew Wilson wrote: What do I have to do to get off this list. Murder someone? Please take me off the list as I have already tried to unsubscribe several times. The email is registered under [EMAIL PROTECTED] -Original Message- From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent:

Re: [PHP] Open New URL window

2007-09-19 Thread Jim Lucas
Andrew Prostko wrote: I am new to PHP and to email lists so I apologize in advance. What I am trying to do is to take a password from user input, check it to make sure it is == to something, say “burgers” My problem is, I do not know how to make the Else

Re: [PHP] Open New URL window

2007-09-19 Thread Richard S. Crawford
On Wednesday 19 September 2007 15:50:08 Andrew Prostko wrote: My problem is, I do not know how to make the Else statement... How do I get it to open a new url? I want it IF yes open this page, else open this page Andrew, try the header() function: ?php if ($_POST['pw'] != $password)

Re: [PHP] back on bug 42065 , strange behavior with ArrayObject

2007-09-19 Thread Chris
Julien Pauli wrote: Wow, all right ; that's why casting to (array) before passing the variable , thus making a copy of it, works. Thanks for that short but effective answer ;-) However, except in the comments, this is not said in the original doc. It should be written ArrayObject

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-19 Thread Patrik Hasibuan
Hi Arvid, thank you very much for your remark. It is useful for me. === On Fri, 14 Sep 2007 12:01:40 +0300 Arvids Godjuks [EMAIL PROTECTED] wrote: Don't use SQL_CALC_FOUND ROWS on simple queries, when you have to run a simple query on one or two (with join) tables with a simple WHERE.

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-19 Thread Patrik Hasibuan
Dear Brian, My problem is solved. thank you very much for your help. === On Wed, 12 Sep 2007 14:04:11 -0400 brian [EMAIL PROTECTED] wrote: Patrik Hasibuan wrote: Dear my friends... I am trying to display the content of a table. Each page must content only 5 records maximum. Each page

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-19 Thread Patrik Hasibuan
Dear mike, your thread solved my problem. I really appreciate your help. Thank you very much. On Thu, 13 Sep 2007 14:49:29 -0700 mike [EMAIL PROTECTED] wrote: warning: this is VERY UGLY CODE. i wrote it 3-4 years ago now i think and it just keeps working. you call it this way: #