[PHP] [JS question] : I want to block onChange event in Firefox...

2006-06-30 Thread David BERCOT
Hi, I am blocked on this problem since so a long time that I prefer asking here my question... I'd like, if the data isn't correct, that the user stay in the input zone. Everything is ok with IE but not with Firefox. Here is my code : // Validation des données. function demarrage_controles() {

[PHP] Stop process when user close window browser

2006-06-30 Thread weetat
Hi all, I am using PHP 4.3.2 and MYSQL database. I think this question has been asked many times, however not solutions. The problem is that I have a php script which connect to db and update data to db which took length of time to be completed. However sometimes user accidentally close

Re: [PHP] [JS question] : I want to block onChange event in Firefox...

2006-06-30 Thread nicolas figaro
Hi, did you try to open the javascript console in firefox to see if there is any error ? (in the tools or outils menu). hope this'll help / bon courage N F David BERCOT a écrit : Hi, I am blocked on this problem since so a long time that I prefer asking here my question... I'd like, if

Re: [PHP] [JS question] : I want to block onChange event in Firefox...

2006-06-30 Thread Chris
David BERCOT wrote: Hi, I am blocked on this problem since so a long time that I prefer asking here my question... I'd like, if the data isn't correct, that the user stay in the input zone. Everything is ok with IE but not with Firefox. Search for javascript mailing list in your favourite

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread Thomas Munz
By default, PHP will also stop execution when the browser is closed. See: http://de.php.net/manual/en/features.connection-handling.php on Friday 30 June 2006 09:06, weetat wrote: Hi all, I am using PHP 4.3.2 and MYSQL database. I think this question has been asked many times, however not

Re: [PHP] [JS question] : I want to block onChange event in Firefox...

2006-06-30 Thread David BERCOT
Hi, did you try to open the javascript console in firefox to see if there is any error ? (in the tools or outils menu). Yes I did. No error... I was told to go to a JS list (here, it is a PHP one), so I'll look for one ;-) Thank you / merci. David. hope this'll help / bon courage

[PHP] �Թ����ʹ͡����µ��-����Ѻ����ӧҹ��Ш��������Ңͧ�Ԩ������ͼ�������ҡ�����˹���ѵ���ôԵ�����Թ��������Ҵ͡ᾧ

2006-06-30 Thread k. chin
ÊÔ¹àª×èÍ´Í¡àºÕéµèÓ-ÊÓËÃѺ¼Ùé·Ó§Ò¹»ÃШÓËÃ×Íà¨éҢͧ¡Ô¨¡ÒÃËÃ×ͼÙé·ÕèÍÂÒ¡à¤ÃÕÂ˹ÕéºÑµÃà¤Ã´ÔµËÃ×ÍÊÔ¹àª×èÍà¡èÒ´Í¡á¾§æ ´éÇÂÊÔ¹àª×èÍ´Í¡àºÕé·ÕèµèÓ 0.69 - 0.99% äÁèÁÕ¤èÒ¸ÃÃÁà¹ÕÂÁ㹡ÒÃãªéǧà§Ô¹ ¨ÐạÀÒÃÐ˹ÕéÊÙ§ ´Í¡àºÕéÂᾧÍÂÙè·ÓäÁ

[PHP] Downloading page

2006-06-30 Thread BBC
Hi all... I'm interesting in a page (using PHP script) in internet, and I'd like to download that page with the complete script. the question is: Can I..? and How..? thank for your input... Best Regards BBC **o0o** -- PHP General

Re: [PHP] Downloading page

2006-06-30 Thread Stut
BBC wrote: Hi all... I'm interesting in a page (using PHP script) in internet, and I'd like to download that page with the complete script. the question is: Can I..? and How..? thank for your input... No you can't. And I thank $DEITY for that. If you really want the source code contact

[PHP] bug in php 5.1.4

2006-06-30 Thread Alain Roger
Hi, I' ve discovered a bug in PHP 5.1.4. This version of PHP create a new session everytime you refresh the same php page or that you switch from 1 page to another page. I downgraded it to PHP 5.1.2 and it works correctly. It could be interesting to fix this bug. if you want moredetail, contact

Re: [PHP] bug in php 5.1.4

2006-06-30 Thread Thomas Munz
There must be a special code in your script that causes it like this bug: http://bugs.php.net/bug.php?id=37926 on Friday 30 June 2006 11:39, Alain Roger wrote: Hi, I' ve discovered a bug in PHP 5.1.4. This version of PHP create a new session everytime you refresh the same php page or that

Re: [PHP] bug in php 5.1.4

2006-06-30 Thread Jochem Maas
Alain Roger wrote: Hi, I' ve discovered a bug in PHP 5.1.4. This version of PHP create a new session everytime you refresh the same php page or that you switch from 1 page to another page. I downgraded it to PHP 5.1.2 and it works correctly. It could be interesting to fix this bug. if it

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread weetat
Hi Thomas, Yes. I read the manual regarding the connection handling. However ,in my php program , the execution did not stop , because i have logger which log sql statement INSERT statement when inserted data to database is ok . When i close the browser , the sql execution still running,

Re: [PHP] Downloading page

2006-06-30 Thread nicolas figaro
BBC a écrit : Hi all... I'm interesting in a page (using PHP script) in internet, and I'd like to download that page with the complete script. the question is: Can I..? Hi, you can't directly. you have to ask the webmaster of the site. but the source code won't be helpfull if the script

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread Thomas Munz
What kind of connection you use ( persistent ?) and which PHP and MySQL version? Normaly, PHP exit after the browser gets closed, but sended SQL to MySQL get finished executed. on Friday 30 June 2006 11:54, weetat wrote: Hi Thomas, Yes. I read the manual regarding the connection

RE: [PHP] [NEWBIE] PHP General List Guide Other Good Stuff

2006-06-30 Thread Jay Blanchard
[snip] This was listed in another thread but I think would be a great tool and online refference for any one who is programming in PHP and especially for NEWBIES. http://www.hudzilla.org/phpbook/ [and snip] If you have a question about any of the pear packages, join the appropriate list here:

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread Rasmus Lerdorf
weetat wrote: Hi Thomas, Yes. I read the manual regarding the connection handling. However ,in my php program , the execution did not stop , because i have logger which log sql statement INSERT statement when inserted data to database is ok . When i close the browser , the sql execution

Re: [PHP] [NEWBIE] PHP General List Guide Other Good Stuff

2006-06-30 Thread tedd
At 9:16 AM +1000 6/30/06, Chris wrote: Jay Blanchard wrote: Recommended reading http://zirzow.dyndns.org/php-general/NEWBIE Should we add a link to the pear support page for pear related questions? Something as simple as: If you have a question about any of the pear packages, join the

Re: [PHP] [NEWBIE] PHP General List Guide Other Good Stuff

2006-06-30 Thread tedd
At 4:45 PM -0700 6/29/06, Scott Heinrichs wrote: This was listed in another thread but I think would be a great tool and online refference for any one who is programming in PHP and especially for NEWBIES. http://www.hudzilla.org/phpbook/ Also, in similar fashion:

RE: [PHP] [NEWBIE] PHP General List Guide Other Good Stuff

2006-06-30 Thread Jay Blanchard
[snip] Also, in similar fashion: http://www.htmlgoodies.com/beyond/php/article.php/3472391 http://www.w3schools.com/php/default.asp http://www.weberdev.com/ViewArticle/433 http://www.weberdev.com/Manuals/ http://www.unf.edu/~rita0001/eresources/php_tutorials/index.htm There's lot's of links we

Re: [PHP] Multiple if() statements

2006-06-30 Thread tedd
At 11:07 PM -0600 6/29/06, John Meyer wrote: Larry Garfield wrote: switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well. In other words, if you look at a logical ladder as the roots of the tree, as long as each root

Re: [PHP] creating a threaded message system--sorting messages

2006-06-30 Thread Ben Liu
On Jun 30, 2006, at 12:05 AM, Larry Garfield wrote: I've written such a system before more than once. You do the sorting in SQL, and then traverse the data recursively in PHP to build the tree. It's a single SQL query. Check the archives for this list for about 3-4 weeks ago, I

Re: [PHP] creating a threaded message system--sorting messages

2006-06-30 Thread Ben Liu
Hi Larry, Thanks for the help. I was just coming to a similar conclusion last night after reading the warnings on this thread about querying the database recursively. I guess my test data with 7 posts is not a rigorous simulation. :-) I've looked through the posts on the PHP general list

Re: [PHP] Re: Find out cookies on a computer?

2006-06-30 Thread Jochem Maas
Adam Zey wrote: Peter Lauri wrote: Is it possible to some how find out all cookies on a specific computer and their name and value? I assume not :) /Peter No, because you don't OWN them, therefore you have no right (either technologically or ethically) to see them. the 'right'

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread tedd
At 5:54 PM +0800 6/30/06, weetat wrote: Hi Thomas, Yes. I read the manual regarding the connection handling. However ,in my php program , the execution did not stop , because i have logger which log sql statement INSERT statement when inserted data to database is ok . When i close the

RE: [PHP] [NEWBIE] PHP General List Guide Other Good Stuff

2006-06-30 Thread tedd
At 8:09 AM -0500 6/30/06, Jay Blanchard wrote: [snip] Also, in similar fashion: http://www.htmlgoodies.com/beyond/php/article.php/3472391 http://www.w3schools.com/php/default.asp http://www.weberdev.com/ViewArticle/433 http://www.weberdev.com/Manuals/

Re: [PHP] design?

2006-06-30 Thread John Wells
On 6/29/06, Sjef [EMAIL PROTECTED] wrote: Hi there, Hi Sjef, First off, I think David has a good point with regards to the OO vs Procedural approach. If you're looking to do this quick and easy, it might not be worth your time fussing with OO. Unless you'd like to just for the exercise,

Re: [PHP] creating a threaded message system--sorting messages

2006-06-30 Thread Larry Garfield
On Friday 30 June 2006 07:19, Ben Liu wrote: Hi Larry, I've looked through the posts on the PHP general list going back about 3-6 weeks and can't find the thread you speak of. I searched by your name assuming that you posted into the thread and searched by the string recursive and recursion.

Re: [PHP] Multiple if() statements

2006-06-30 Thread John Wells
On 6/30/06, tedd [EMAIL PROTECTED] wrote: At 11:07 PM -0600 6/29/06, John Meyer wrote: Larry Garfield wrote: switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well. Not true. I've come to really appreciate the

[PHP] Templates, PHP Frameworks, and DB Abstraction?

2006-06-30 Thread Jay Paulson
I'd like to get some feedback on what the list thinks is a good template engine other than smarty. I'd also like to do some quick prototyping using a PHP framework does anyone have any recommendations for one that is easy to pick up and run with? Finally, does anyone have any suggestions for a

[PHP] apc and ZendPlatform

2006-06-30 Thread Rick Emery
We're running Zend Platform on a server that also has apc installed; we're using apc in the scripts to cache data, and I understand (I think) that it also does bytecode caching. Zend Platform includes a php accelerator, which (I think) is also caching bytecode. Does anybody know if we'll

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread tg-php
On the other hand, you can tell the web server that the browser has been closed or the page has 'exited'. Not 100% reliable, but in theory you could use the onUnload (think that was it) event for a web page body onunload=dosomejavascript(); that does something sloppy like spawn a popup

Re: [PHP] apc and ZendPlatform

2006-06-30 Thread Jochem Maas
Rick Emery wrote: We're running Zend Platform on a server that also has apc installed; we're using apc in the scripts to cache data, and I understand (I think) that it also does bytecode also often referred to as 'opcode' caching caching. correct. Zend Platform includes a php

RE: [PHP] design?

2006-06-30 Thread Peter Lauri
How about answer extends question? -Original Message- From: David Tulloh [mailto:[EMAIL PROTECTED] Sent: Friday, June 30, 2006 9:36 AM To: Sjef Cc: php-general@lists.php.net Subject: Re: [PHP] design? Sjef wrote: Hi there, I am starting a new, very small project. A simple question

Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Adam Zey
Dan McCullough wrote: I've come into this discussion pretty late so please bear with me if I go over something that has been ruled out. You are trying to print out in a threaded method the first post in a thread followed by each post after that, that is a child/reply to that post. Is that

RE: [PHP] Templates, PHP Frameworks, and DB Abstraction?

2006-06-30 Thread KermodeBear
Finally, does anyone have any suggestions for a good PHP database abstraction library? PHP5 has PDO for database abstraction; check the manual for information on that one. If you're stuck with PHP4 then PEAR has several offerings: http://pear.php.net/package/DB/

Re: Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Ben Liu
Thanks to everybody who posted on this thread. I wanted to post back the solution I came up with after removing the DB query from the recursion. In case anyone else is trying to accomplish the same thing, this is how I solved it (criticisms welcome, and note that I have not tested it extensively

RE: [PHP] Multiple if() statements

2006-06-30 Thread Ford, Mike
On 30 June 2006 13:37, tedd wrote: At 11:07 PM -0600 6/29/06, John Meyer wrote: Larry Garfield wrote: switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well. In other words, if you look at a logical

Re: [PHP] design?

2006-06-30 Thread Sjef
Thanks, John, I'm not sure I completely get the idea of a pair class. As an question and answer are in the same database tabel I now created a questionDepot class that gets the array from the db, does save and update operations, and for example, sets a flag in the db tabel when a question is

[PHP] Recursing sessions?

2006-06-30 Thread Mark
Here is a problem I am seeing, A browser hits a site the uses frames, for the sake of argument, lets call this site a squirrelmail web mail server. The browser seems to spawn a number of requests at the same time (I think one for each content frame), I get multiple PS_READ_FUNC calls, and then

RE: [PHP] Recursing sessions?

2006-06-30 Thread Jay Blanchard
[snip] Here is a problem I am seeing, A browser hits a site the uses frames, for the sake of argument, lets call this site a squirrelmail web mail server. The browser seems to spawn a number of requests at the same time (I think one for each content frame), I get multiple PS_READ_FUNC calls,

RE: [PHP] Recursing sessions?

2006-06-30 Thread markw
[snip] Here is a problem I am seeing, A browser hits a site the uses frames, for the sake of argument, lets call this site a squirrelmail web mail server. The browser seems to spawn a number of requests at the same time (I think one for each content frame), I get multiple PS_READ_FUNC

RE: [PHP] Recursing sessions?

2006-06-30 Thread Jay Blanchard
[snip] I am debugging a PHP session manager and this behavior is keeping the system from working correctly. [/snip] A more descriptive explanation along with some code will help us to help you. AFAICS we do not have enough information to go on. Does each frame generate its own session? Can you

[PHP] mysqli_stmt::bind_param(), Number of variables doesn't match number of parameters in prepared statement

2006-06-30 Thread gg15
I wanted to use the prepared statements of mysqli, but the following problem occured: If I just use one parameter everything works fine $prep = $this-mysqli-prepare('INSERT INTO guestbook (Von, Datum) VALUES (?, NOW())'); $prep-bind_param('s', $this-Von); but if I try to use two $prep =

[PHP] ONE PAGE CONNECTS MANY DATABASE

2006-06-30 Thread BBC
Hi again.. I'm wondering is it possible to make one page which connects to many DataBase? If it's possible please tell me where can I get the references? Thank Best Regards BBC **o0o** -- PHP General Mailing List

Re: [PHP] apc and ZendPlatform

2006-06-30 Thread Rick Emery
Quoting Jochem Maas [EMAIL PROTECTED]: Rick Emery wrote: We're running Zend Platform on a server that also has apc installed; we're using apc in the scripts to cache data, and I understand (I think) that it also does bytecode also often referred to as 'opcode' caching That's what I meant;

Re: [PHP] ONE PAGE CONNECTS MANY DATABASE

2006-06-30 Thread John Nichel
BBC wrote: Hi again.. I'm wondering is it possible to make one page which connects to many DataBase? Yes. If it's possible please tell me where can I get the references? Look at the connection functions for whatever database engine you're using. -- John C. Nichel IV Programmer/System

Re: [PHP] ONE PAGE CONNECTS MANY DATABASE

2006-06-30 Thread Dave Goodchild
On 30/06/06, John Nichel [EMAIL PROTECTED] wrote: BBC wrote: Hi again.. I'm wondering is it possible to make one page which connects to many DataBase? Yes. If you are using mysql, why not create connection functions that sit outside the server root (in the include path) for security

Re: [PHP] ONE PAGE CONNECTS MANY DATABASE

2006-06-30 Thread Brad Bonkoski
Yes. For Mysql.. http://www.php.net/manual/en/function.mysql-connect.php -B BBC wrote: Hi again.. I'm wondering is it possible to make one page which connects to many DataBase? If it's possible please tell me where can I get the references? Thank Best Regards

RE: [PHP] Recursing sessions?

2006-06-30 Thread Mark
Jay Blanchard wrote: [snip] I am debugging a PHP session manager and this behavior is keeping the system from working correctly. [/snip] A more descriptive explanation along with some code will help us to help you. AFAICS we do not have enough information to go on. Does each frame

Re: [PHP] Functions

2006-06-30 Thread [EMAIL PROTECTED]
I was able to get the return to work but not the pass in the reference. One last question, what if I want to have each item on a separate line like: function cleaner($var) { trim($var); strip_tags($var); ucfirst($var); addslashes($var); str_replace ($,,$var); } $var = abc's; echo $var; How

Re: [PHP] apc and ZendPlatform

2006-06-30 Thread Richard Lynch
On Fri, June 30, 2006 9:27 am, Rick Emery wrote: We're running Zend Platform on a server that also has apc installed; we're using apc in the scripts to cache data, and I understand (I think) that it also does bytecode caching. Zend Platform includes a php accelerator, which (I think) is also

Re: [PHP] Stop process when user close window browser

2006-06-30 Thread Richard Lynch
On Fri, June 30, 2006 4:54 am, weetat wrote: Yes. I read the manual regarding the connection handling. However ,in my php program , the execution did not stop , because i have logger which log sql statement INSERT statement when inserted data to database is ok . When i close the

[PHP] Displaying data from a MySLQ table

2006-06-30 Thread Don
Hi Have have a varchar field in a MySQL database which contains the following 905.362.6000ls'L' I am trying to display it on my web page in a INPUT=TEXT field but all I see is: 905.362.6000 I am wondering why the trailing characters do not display even though they are present in the

[PHP] Quick Question re: Windows/Linux PHP

2006-06-30 Thread Beauford
Hi, I'm just curious, because I come across this from time to time. Why does the code below work on Windows and not on Linux. PHP is 5.0 on Linux and 4.4 on Windows (still can't get 5 on Windows). The code at the very bottom is how I got it to work on Linux. Also, why is it with the same setup I

Re: [PHP] Find out cookies on a computer?

2006-06-30 Thread Richard Lynch
On Thu, June 29, 2006 4:23 pm, Peter Lauri wrote: Is it possible to some how find out all cookies on a specific computer and their name and value? I assume not :) If you have physical access to it, Netscape and IE cache their non-session cookies in files you can dig out. Session cookies can

Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Adam Zey
Ben Liu wrote: Thanks to everybody who posted on this thread. I wanted to post back the solution I came up with after removing the DB query from the recursion. In case anyone else is trying to accomplish the same thing, this is how I solved it (criticisms welcome, and note that I have not tested

Re: [PHP] Recursing sessions?

2006-06-30 Thread Richard Lynch
On Fri, June 30, 2006 11:11 am, Mark wrote: Here is a problem I am seeing, A browser hits a site the uses frames, for the sake of argument, lets call this site a squirrelmail web mail server. The browser seems to spawn a number of requests at the same time (I think one for each content

Re: [PHP] Displaying data from a MySLQ table

2006-06-30 Thread Stut
Don wrote: Hi Have have a varchar field in a MySQL database which contains the following 905.362.6000ls'L' I am trying to display it on my web page in a INPUT=TEXT field but all I see is: 905.362.6000 I am wondering why the trailing characters do not display even though they are

Re: [PHP] Functions

2006-06-30 Thread Richard Lynch
On Fri, June 30, 2006 12:00 am, [EMAIL PROTECTED] wrote: I am trying to create a function to clean up variables that are user inputted from a form. I am not getting this script to work. Can anyone help. ---Start Script--- function cleaner($var) {

Re: [PHP] Displaying data from a MySLQ table

2006-06-30 Thread John Nichel
Don wrote: Hi Have have a varchar field in a MySQL database which contains the following 905.362.6000ls'L' I am trying to display it on my web page in a INPUT=TEXT field but all I see is: 905.362.6000 Because it has quotes in it. I bet if you look at the source of the page, the full

Re: [PHP] Functions

2006-06-30 Thread Stut
[EMAIL PROTECTED] wrote: I was able to get the return to work but not the pass in the reference. One last question, what if I want to have each item on a separate line like: function cleaner($var) { trim($var); strip_tags($var); ucfirst($var); addslashes($var); str_replace ($,,$var); } $var

Re: Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Ben Liu
On 6/30/06, Adam Zey [EMAIL PROTECTED] wrote: I think that will work, but there is one huge improvement you can make. You are making millions of copies of your work array! Not only do you pass the entire array by value recursively, but foreach makes copies of the arrays it loops through! So who

Re: [PHP] creating a threaded message system--sorting messages

2006-06-30 Thread Richard Lynch
On Thu, June 29, 2006 9:11 am, Ben Liu wrote: I'm trying to present the messages to the users in threaded order rather than flat. I'm having a lot of trouble figuring out how to sort the posts so they appear in the correct threaded order. I don't think I can do this purely with a SQL query.

RE: [PHP] Displaying data from a MySLQ table

2006-06-30 Thread Don
Ok, better but stil not displayting properly. Here is what my database field has: import.csv'/\ Here is what is displaying: import.csv'/\ size=40 maxlength=40 onkeypress=return noenter() It's choking on the double quote in the database field. Here is the code snippet from my form: input

Re: [PHP] Programming question - New to PHP

2006-06-30 Thread Richard Lynch
On Wed, June 28, 2006 6:58 pm, Russbucket wrote: I took an example of a script from the PHP documentation and try to connect to my database. If I leave in the or die part of line 3, I get nothing, if I comment out that part I get the echo message on line 4. ?php // Connecting and

Re: [PHP] Multiple if() statements

2006-06-30 Thread Richard Lynch
On Thu, June 29, 2006 11:07 pm, Larry Garfield wrote: switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well. Except in PHP which supports: switch(TRUE) { case _boolean_expression_: break; } So you can have case

Re: [PHP] apc and ZendPlatform

2006-06-30 Thread Jochem Maas
Rick Emery wrote: ... be gained from running both (for opcode caching) Okay. We haven't seen any problems so far. I just discovered the documentation (which was in such an obvious location that I'm embarassed I didn't find it last time I looked: http://www.php.net/apc), and it looks like

Re: [PHP] Displaying data from a MySLQ table

2006-06-30 Thread Richard Lynch
On Fri, June 30, 2006 1:39 pm, Don wrote: 905.362.6000ls'L' tdinput type=text name=phone value=?PHP echo query_database($db_account-Phone); ? size=25/td So you end up with this: value=905.362.60001s'L' ^ And, in HTML, this | marks the end of the string. You know how

RE: [PHP] Displaying data from a MySLQ table

2006-06-30 Thread Richard Lynch
The fact that you are calling stripslashes tells me that one of two things has occurred. #1. You escaped data coming into the DB *twice*, which often happens with Magic Quotes GPC + (addslashes || mysql_real_escape_string) used together. Your data is corrupt, and until you fix that, you'll just

[PHP] Update or add?

2006-06-30 Thread Brian Dunning
I have a table where I want to update each record with today's date as it's hit, or add the record if it's not in there: +--+-++ | id | creation_date | last_hit | +--+-++ I'm trying to do this with a minimum of hits to the

Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Adam Zey
Ben Liu wrote: The second thing to do is to make the foreach work on references instead of copies. I actually think that since what we have in our function is now a reference, the foreach WILL NOT copy it. Anyone have any ideas on this? Is the foreach loop in fact copying $workArr? And how

RE: [PHP] Update or add?

2006-06-30 Thread Jim Moseby
I have a table where I want to update each record with today's date as it's hit, or add the record if it's not in there: +--+-++ | id | creation_date | last_hit | +--+-++ I'm trying to do this with a minimum of

Re: [PHP] Update or add?

2006-06-30 Thread Paul Nowosielski
On Friday 30 June 2006 14:37, Brian Dunning wrote: I have a table where I want to update each record with today's date as it's hit, or add the record if it's not in there: +--+-++ | id | creation_date | last_hit |

Re: [PHP] Update or add?

2006-06-30 Thread Adam Zey
Paul Nowosielski wrote: On Friday 30 June 2006 14:37, Brian Dunning wrote: I have a table where I want to update each record with today's date as it's hit, or add the record if it's not in there: +--+-++ | id | creation_date | last_hit |

Re: [PHP] Re: creating a threaded message system--sorting messages

2006-06-30 Thread Ben Liu
On Jun 30, 2006, at 5:04 PM, Adam Zey wrote: I mean, do this: foreach ( array_keys($workArr) as $key ) { echo $workArr[$key]['foo']; } instead of this: foreach ( $workArr as $key = $value ) { echo $value['foo']; } Okay, I think I get the idea. So using my code example...

Re: [PHP] Update or add?

2006-06-30 Thread Paul Nowosielski
Good advice , Thank you! -- Paul Nowosielski Webmaster On Friday 30 June 2006 15:45, Adam Zey wrote: Paul Nowosielski wrote: On Friday 30 June 2006 14:37, Brian Dunning wrote: I have a table where I want to update each record with today's date as it's hit, or add the record if it's not

Re: [PHP] Update or add?

2006-06-30 Thread Venkat Venkataraju
Hi All, there is not-so-used format of SQL format that is INSERT INTO table SET col1=data1, col2=data2... ON DUPLICATE KEY UPDATE col1=data1, col2=data2...; you have to define a primary or unique key in the table and all will work well. for more info

RE: [PHP] Multiple if() statements

2006-06-30 Thread tedd
At 4:26 PM +0100 6/30/06, Ford, Mike wrote: On 30 June 2006 13:37, tedd wrote: At 11:07 PM -0600 6/29/06, John Meyer wrote: Larry Garfield wrote: [1] switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well.

Re: [PHP] mysqli_stmt::bind_param(), Number of variables doesn't match number of parameters in prepared statement

2006-06-30 Thread chris smith
On 7/1/06, gg15 [EMAIL PROTECTED] wrote: I wanted to use the prepared statements of mysqli, but the following problem occured: If I just use one parameter everything works fine $prep = $this-mysqli-prepare('INSERT INTO guestbook (Von, Datum) VALUES (?, NOW())'); $prep-bind_param('s',

[PHP] Re: Sad PHP Poem

2006-06-30 Thread Martin Alterisio
2006/6/26, Martin Alterisio [EMAIL PROTECTED]: offtopic type=slightly offtopic class=poetic literary A sad poem of an algorithm where solitude brought excessive use of cpu cycles and memory allocation for redundant data (it copied over and over again the same image till all memory was filled