php-general Digest 6 Jun 2006 04:36:10 -0000 Issue 4169

2006-06-05 Thread php-general-digest-help
php-general Digest 6 Jun 2006 04:36:10 - Issue 4169 Topics (messages 237411 through 237440): Re: i have a problem inserting blob data larger than 1 mb 237411 by: Adam Zey Re: Delete 237412 by: Richard Lynch 237413 by: Richard Lynch 237415 by: Chris Boget

[PHP] Using variable content to name a class

2006-06-05 Thread Dave M G
PHP list, I suspect this is a rather basic concept, but I could not find the specifics in the online manual. I have a set of classes, and the name of each class is stored in a column in a table in my MySQL database. When I want to create an object from one of my classes, I also query the

Re: [PHP] Using variable content to name a class

2006-06-05 Thread Chris
Dave M G wrote: PHP list, I suspect this is a rather basic concept, but I could not find the specifics in the online manual. I have a set of classes, and the name of each class is stored in a column in a table in my MySQL database. When I want to create an object from one of my classes, I

Re: [PHP] Using variable content to name a class

2006-06-05 Thread Dave M G
Chris, Thank you for replying. $object = new $className(); Is this possible? If in doubt, test it out ;) Yes, it will work. Oh, that's actually the code I can use? I just wrote it as an explanatory aid, not thinking that it could be literally done like that. I assumed there was a specific

[PHP] Re: How do I make a HTML tree for a set of nodes?

2006-06-05 Thread David Robley
Niels wrote: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or tablecells, showing the

[PHP] Unicode

2006-06-05 Thread tedd
At 7:08 PM -0700 6/4/06, Rasmus Lerdorf wrote: Larry Garfield wrote: In C or C++, yes. In PHP, do not assume the same string-number mapping. Numeric definition is irrelevant. Right, and now bring Unicode into the picture and this becomes even more true. -Rasmus I know there's always RTFM,

[PHP] pager fix - cash offered

2006-06-05 Thread Ross
I need this pager fixed http://scottishsocialnetworks.org/editorx.php http://scottishsocialnetworks.org/editorx.php http://scottishsocialnetworks.org/class.pager.phps The problem is it resets when the numbered pages are pressed at the bottom. I think the query string gets reset when the

[PHP] Re: How do I make a HTML tree for a set of nodes?

2006-06-05 Thread Niels
On Monday 05 June 2006 13:32, David Robley wrote: Niels wrote: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking

Re: [PHP] Re: Retrieving Content

2006-06-05 Thread Adam Zey
chris smith wrote: On 6/3/06, Adam Zey [EMAIL PROTECTED] wrote: Rodrigo de Oliveira Costa wrote: I just discovered the problem I have to retrieve the output of the site and not the url since its dynamic. Ca I do it like retrieve the output of this url: www.tryout.com/1/2/ And of course

[PHP] Re: SPL Iterator and Associative Array

2006-06-05 Thread Adam Zey
Jason Karns wrote: -Original Message- From: Greg Beaver [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 10:39 PM To: Jason Karns Cc: php-general@lists.php.net Subject: Re: SPL Iterator and Associative Array Jason Karns wrote: I'm going to try my best to explain what I'm trying

[PHP] PHP/MySQL question

2006-06-05 Thread Wolf
I have a php form that pulls data from the database (hence the problems) I need to do an OR search on three columns, and AND the rest, anyone have a good way to do this? So far my searching on the MySQL lists have been fruitless more then anything, and I figured we've probably come across this

[PHP] Re: pager fix - cash offered

2006-06-05 Thread Jo�o C�ndido de Souza Neto
I could fix it for you, but, i just can look at it in the evening when i´ll be at home. If it could be, wait for my contac e-mail this evening. Thanks. Ross [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] I need this pager fixed http://scottishsocialnetworks.org/editorx.php

RE: [PHP] PHP/MySQL question

2006-06-05 Thread Jay Blanchard
[snip] I need to do an OR search on three columns, and AND the rest, anyone have a good way to do this? So far my searching on the MySQL lists have been fruitless more then anything, and I figured we've probably come across this ourselves at some point. [/snip] More of a MySQL question, but

Re: [PHP] PHP/MySQL question

2006-06-05 Thread Richard Lynch
On Mon, June 5, 2006 10:32 am, Wolf wrote: I have a php form that pulls data from the database (hence the problems) I need to do an OR search on three columns, and AND the rest, anyone have a good way to do this? So far my searching on the MySQL lists have been fruitless more then

Re: [PHP] Explicit Stream Flush with fsockopen()

2006-06-05 Thread Richard Lynch
http://php.net/fflush On Sun, June 4, 2006 9:51 pm, Oliver John V. Tibi wrote: Hi Guys, I know this may sound fundamental to some of you, but do you know any way of explicitly flushing out stream buffers off to the socket using fsockopen()/fputs() combos? Hope to hear from you soon.

[PHP] i have a problem inserting blob data larger than 1 mb

2006-06-05 Thread sunaram patir
hi list, i am facing a problem inserting binary data into a blob field.this is my /etc/my.cnf file. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock connect_timeout=60 [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log

Re: [PHP] When is z != z ?

2006-06-05 Thread tg-php
I know this discussion doesn't need to continue any further..hah.. but I think the biggest confusion people are having is that they're looking at two things and assuming that PHP operates the same on both and these two things serve different purposes. 1. Incrementing strings: Best example

[PHP] Re: i have a problem inserting blob data larger than 1 mb

2006-06-05 Thread Adam Zey
sunaram patir wrote: hi list, i am facing a problem inserting binary data into a blob field.this is my /etc/my.cnf file. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock connect_timeout=60 [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Sat, June 3, 2006 8:40 pm, George Babichev wrote: Hello everyone! I wrote a blog application, but now for the admin panel, i am trying to add a feature to delete blog posts. It would show the title of the post next to it, and have a delete link which would delete it. How would I do this?

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote: You may find it easier to generate links of the form delete.php?id=1, etc. Then you won't have to use a seperate form for each link. The id will be available in delete.php in $_GET. The same sanity checking applies in this case too. Gah!

Re: [PHP] When is z != z ?

2006-06-05 Thread tedd
-TG: Thanks for your explanation and time. Normally, I don't alpha++ anything -- not to criticize others, but to me it doesn't make much sense to add a number to a character. But considering the php language is so string aware, as compared to other languages, I just tried it on a lark just

Re: [PHP] Delete

2006-06-05 Thread Chris Boget
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote: You may find it easier to generate links of the form delete.php?id=1, etc. Then you won't have to use a seperate form for each link. The id will be available in delete.php in $_GET. The same sanity checking applies in this case too. Gah! That

Re: [PHP] When is z != z ?

2006-06-05 Thread Adam Zey
tedd wrote: -TG: Thanks for your explanation and time. Normally, I don't alpha++ anything -- not to criticize others, but to me it doesn't make much sense to add a number to a character. But considering the php language is so string aware, as compared to other languages, I just tried it on

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Mon, June 5, 2006 12:41 am, Rabin Vincent wrote: I don't see how POST is better/more secure for a delete action. If you don't see how it's better, then READ THE HTTP SPECS!!! -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Delete

2006-06-05 Thread Richard Lynch
On Mon, June 5, 2006 11:52 am, Chris Boget wrote: On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote: You may find it easier to generate links of the form delete.php?id=1, etc. Then you won't have to use a seperate form for each link. The id will be available in delete.php in $_GET. The same

Re: [PHP] .htaccess - change index.php to index.abc

2006-06-05 Thread Richard Lynch
On Sat, June 3, 2006 6:47 pm, Labunski wrote: What should I change in .htaccess, so that visitors will see index.abc instead of index.php. I just wanna hide file's extension. Assuming you use PHP as Module and not CGI: Files index.abc ForceType application/x-httpd-php /Files -- Like

Re: [PHP] When is z != z ?

2006-06-05 Thread Robert Cummings
On Mon, 2006-06-05 at 12:49, tedd wrote: -TG: Thanks for your explanation and time. Normally, I don't alpha++ anything -- not to criticize others, but to me it doesn't make much sense to add a number to a character. But considering the php language is so string aware, as compared to

Re: [PHP] Retrieve output from HTML or PHP file

2006-06-05 Thread Richard Lynch
On Fri, June 2, 2006 12:27 pm, Rodrigo de Oliveira Costa wrote: Can I do the below to an URL, like retrieving the output of a site and store it on a variable? ?php echo file_get_contents('http://php.net/'); ? -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List

Re: [PHP] If value is odd or not

2006-06-05 Thread Richard Lynch
On Fri, June 2, 2006 8:32 am, Jonas Rosling wrote: is there any easy why to check if a value is odd or not? $parity = $variable % 2 ? 'even' : 'odd'; echo $variable is $paritybr /\n; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] PHP/MySQL question

2006-06-05 Thread Wolf
Thanks guys, I knew it was a stupid Q when I sent it, but I had another one where I encapsulated them in () blow up on me, so I figured if I asked and it was the same answer then I was on the right track. And so far all the tests have shown positive. :) Wolf More of a MySQL question, but

Re: [PHP] If value is odd or not

2006-06-05 Thread Adam Zey
Richard Lynch wrote: On Fri, June 2, 2006 8:32 am, Jonas Rosling wrote: is there any easy why to check if a value is odd or not? $parity = $variable % 2 ? 'even' : 'odd'; echo $variable is $paritybr /\n; Let's make it even more compact and confusing :) echo $variable is .($variable % 2

Re: [PHP] When is z != z ?

2006-06-05 Thread tg-php
This is just one of those cases where the designers had to make a judgement call on how things were going to operate. It makes sense if you look at the two things separately (incrementing vs string 'greatness' evaluation) and makes sense that how they chose to implement the functions are two

Re: [PHP] PHP/Mysql: Making binary field available for download - extra browser window ?

2006-06-05 Thread Richard Lynch
On Fri, June 2, 2006 12:59 am, Matthew Pegg wrote: Working on a PHP script at the moment where I want to be able to extract a file (PDF file) from a mysql database\ That's bad. Read the archives. and force the popup of the File Download dialog, to allow the user to either save or open the

Re: [PHP] Extended Ascii Characters

2006-06-05 Thread Richard Lynch
On Thu, June 1, 2006 6:46 pm, Richard Luckhurst wrote: Hi All I am in the process of cleaning up an application that was left half finished. I am fairly new to PHP so I am seeking the wisdom of the community to help with a little problem. In many cases I need to build command strings to

[PHP] Session variables on Windows

2006-06-05 Thread Tom
Does some well-known problem exist with the session variables in Windows servers? Because in a system that I have running on a Windows server, sometimes the session variables are null causing errors, then I close the browser and open it and in the next intent everything works well... I can't

Re: [PHP] When is z != z ?

2006-06-05 Thread Martin Alterisio
2006/6/5, [EMAIL PROTECTED] [EMAIL PROTECTED]: This is just one of those cases where the designers had to make a judgement call on how things were going to operate. It makes sense if you look at the two things separately (incrementing vs string 'greatness' evaluation) and makes sense that how

Re: [PHP] When is z != z ?

2006-06-05 Thread Larry Garfield
On Monday 05 June 2006 14:56, Martin Alterisio wrote: 2006/6/5, [EMAIL PROTECTED] [EMAIL PROTECTED]: This is just one of those cases where the designers had to make a judgement call on how things were going to operate. It makes sense if you look at the two things separately (incrementing

Re: [PHP] When is z != z ?

2006-06-05 Thread tedd
At 1:10 PM -0400 6/5/06, Robert Cummings wrote: NO! More must be said!! a = z b = z c = z -snip- yx = z yy = z yz = z zaz Sooo, the comparisons stop before we get to aaa and so aaa is never reached. za is the last comparison to occur at which point the

Re: [PHP] When is z != z ?

2006-06-05 Thread Rasmus Lerdorf
tedd wrote: For example, the Unicode issue was raised during this discussion -- if php doesn't consider the numeric relationship of characters, then I see a big problem waiting in the wings. Because if we're having these types of discussions with just considering 00-7F characters, then I can

Re: [PHP] When is z != z ?

2006-06-05 Thread Robert Cummings
On Mon, 2006-06-05 at 21:35, tedd wrote: At 1:10 PM -0400 6/5/06, Robert Cummings wrote: NO! More must be said!! a = z b = z c = z -snip- yx = z yy = z yz = z zaz Sooo, the comparisons stop before we get to aaa and so aaa is never reached.

Re: [PHP] When is z != z ?

2006-06-05 Thread tedd
At 8:18 PM -0500 6/5/06, Larry Garfield wrote: See how the comparison works? It's a purely alphabetic comparison. As for the increment, it actually would never have occurred to me to ++ a string before this thread, honestly. :-) However, what it appears to be doing (and I'm sure Rasmus will

Re: [PHP] When is z != z ?

2006-06-05 Thread Martin Alterisio
2006/6/5, Larry Garfield [EMAIL PROTECTED]: On Monday 05 June 2006 14:56, Martin Alterisio wrote: 2006/6/5, [EMAIL PROTECTED] [EMAIL PROTECTED]: This is just one of those cases where the designers had to make a judgement call on how things were going to operate. It makes sense if you

Re: [PHP] When is z != z ?

2006-06-05 Thread Robert Cummings
On Mon, 2006-06-05 at 22:00, tedd wrote: At 8:18 PM -0500 6/5/06, Larry Garfield wrote: See how the comparison works? It's a purely alphabetic comparison. As for the increment, it actually would never have occurred to me to ++ a string before this thread, honestly. :-) However, what it

Re: [PHP] When is z != z ?

2006-06-05 Thread Larry Garfield
On Monday 05 June 2006 21:12, Martin Alterisio wrote: As for the increment, it actually would never have occurred to me to ++ a string before this thread, honestly. :-) However, what it appears to be doing (and I'm sure Rasmus will correct me if I'm wrong) is using a string base

Re: [PHP] When is z != z ?

2006-06-05 Thread Martin Alterisio
2006/6/6, Larry Garfield [EMAIL PROTECTED]: On Monday 05 June 2006 21:12, Martin Alterisio wrote: As for the increment, it actually would never have occurred to me to ++ a string before this thread, honestly. :-) However, what it appears to be doing (and I'm sure Rasmus will correct me

[PHP] String Manipulation

2006-06-05 Thread Rodrigo de Oliveira Costa
Hi guys I have the following intention and would really like to know if tis possible and if its possible how should it be done. I have a string that is something like this: INPUT TYPE=BUTTON Value='nbsp;nbsp;#171;nbsp;nbsp;' onClick=self.location='/s/979216/22/'SELECT title='chapter

Re: [PHP] String Manipulation

2006-06-05 Thread Chris
Rodrigo de Oliveira Costa wrote: Hi guys I have the following intention and would really like to know if tis possible and if its possible how should it be done. I have a string that is something like this: INPUT TYPE=BUTTON Value='nbsp;nbsp;#171;nbsp;nbsp;'

Re: [PHP] When is z != z ?

2006-06-05 Thread Robert Cummings
On Tue, 2006-06-06 at 00:01, Martin Alterisio wrote: Because defining ++ and and in such a way as to make them behave like numbers would have made them not work for alphabetizing. A string is a string, and comparison of strings is alphabetic (for some definition of alphabet). It's more