php-general Digest 6 Feb 2006 15:01:42 -0000 Issue 3948

2006-02-06 Thread php-general-digest-help
php-general Digest 6 Feb 2006 15:01:42 - Issue 3948 Topics (messages 229910 through 229949): how to show 6 randomly selected featured products? 229910 by: afan.afan.net 229912 by: Chris 229914 by: Sumeet 229946 by: afan.afan.net Re: problem with Mail

Re: [PHP] can't output sql query with php code.

2006-02-06 Thread Sumeet
Paul Goepfert wrote: This is the full code for the code that doesn't work. ?php echo 'select name=month \n'; $month_query = mysql_query(SELECT m_id, months FROM Month); while ($r = mysql_fetch_array($month_query)); { $v = $r[m_id];

RE: [PHP] can't output sql query with php code.

2006-02-06 Thread Brady Mitchell
?php echo 'select name=month \n'; $month_query = mysql_query(SELECT m_id, months FROM Month); while ($r = mysql_fetch_array($month_query)); Remove the semi-colon at the end of the above line and it works like a charm. { $v = $r[m_id];

Re: [PHP] Submitting form without JavaScript

2006-02-06 Thread Sumeet
Peter Lauri wrote: Yes this is a solution, but I want to keep the data sent to PayPal out of the HTML code. If you would use that solution someone can get the username from just checking the source from the page. /Peter i believe in paypal, the username is the email id... why do u want to

Re: [PHP] can't output sql query with php code.

2006-02-06 Thread Paul Goepfert
Thanks everyone for your help. I should have seen the semi-colon at the end of the while loop. I must have looked at the code 20 times and I can't believe I missed it. Paul On 2/6/06, Brady Mitchell [EMAIL PROTECTED] wrote: ?php echo 'select name=month \n'; $month_query =

Re: [PHP] PHP 4.2.2 Float-Mysql addition problem

2006-02-06 Thread Barry
Hi! I forget the rules of float contagion in PHP, but it should work, I would expect... That's what i also did, though. I don't suppose that by sheer chance the decimal portions add up to an even integer?... 0. + 0. might, for example, turn into: 1 (Or might not, depending on a

Re: [PHP] system('bell'); ?

2006-02-06 Thread Oli Howson
each of the terminals could then use a web based POS interface but there was only a single cash drawer. It would also be possible to have each 'till' running a copy of apache server, and communicating with a central database server. I can't for the life of me think of any way the client

Re: [PHP] system( bell ); ?

2006-02-06 Thread Angelo Zanetti
maybe a javascript button that somehow does the dos command or calls another program (exe) that will do the command to open the till...anywayz this is getting OT! Oli Howson wrote: each of the terminals could then use a web based POS interface but there was only a single cash drawer.

Re: [PHP] mail() and Return-Path header

2006-02-06 Thread Marcus Bointon
On 2 Feb 2006, at 13:00, Søren Schimkat wrote: I'm using the mail function for sending mail, and I would like to specify the Return-Path header, but it would seem that PHP or Apache is modyfying the header. Strictly speaking, you should not set a return-path header at all. You should

[PHP] DOM/XML Query

2006-02-06 Thread Andrew Clarke
I'm having some problems using PHP5 on Windows 2000 Server, running IIS 5. When trying to access a document from a xmldoc() function the system responds with the following, *Fatal error*: Call to undefined function xmldoc() in *XML Document* on line *Number* ** How do I fix this problem? Is

[PHP] Re: DOM/XML Query

2006-02-06 Thread Barry
Andrew Clarke wrote: I'm having some problems using PHP5 on Windows 2000 Server, running IIS 5. When trying to access a document from a xmldoc() function the system responds with the following, *Fatal error*: Call to undefined function xmldoc() in *XML Document* on line *Number* ** How do I

[PHP] string lenght?

2006-02-06 Thread William Stokes
Hello, How can I test whether a string is 1 or 2 digits long? Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: string lenght?

2006-02-06 Thread Barry
William Stokes wrote: Hello, How can I test whether a string is 1 or 2 digits long? Thanks -Will strlen() -_- RTFM www.php.net/strlen -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] string lenght?

2006-02-06 Thread Richard Davey
On 6 Feb 2006, at 12:18, William Stokes wrote: How can I test whether a string is 1 or 2 digits long? Cast it to an int (or float if required) and strlen() it. Cheers, Rich -- http://www.corephp.co.uk Zend Certified Engineer PHP Development Services -- PHP General Mailing List

Re: [PHP] string lenght?

2006-02-06 Thread William Stokes
Cheers! Richard Davey [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] On 6 Feb 2006, at 12:18, William Stokes wrote: How can I test whether a string is 1 or 2 digits long? Cast it to an int (or float if required) and strlen() it. Cheers, Rich -- http://www.corephp.co.uk Zend

[PHP] Results In Variable

2006-02-06 Thread Pastor Steve
Greetings, I am attempting to put the results of a ³while² loop into a variable. Example: $result = mysql_query(³SELECT filename, page_title FROM table²); while ($row = mysql_fetch_assoc($result)) { $var = ³a href=\²$htmldir{$row[Œfilename¹]}\²{$row[Œpage_title¹]}/abr

Re: [PHP] Serious bug ?

2006-02-06 Thread Bogdan Ribic
Marco Kaiser wrote: Hi, i tested it with php 5.1.3-dev snap and it works correctly for me. btw. $return = $notdefined_variable; is a bad style for coding and this happens in your situation in a undefined behavior. If you think this is a bug please go to http://bugs.php.net and report them

RE: [PHP] Results In Variable

2006-02-06 Thread Peter Lauri
Put it in an array? -Original Message- From: Pastor Steve [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 8:14 PM To: PHP eMail List Subject: [PHP] Results In Variable Greetings, I am attempting to put the results of a ³while² loop into a variable. Example: $result =

Re: [PHP] Results In Variable

2006-02-06 Thread Austin Denyer
On Mon, 06 Feb 2006 07:14:21 -0600 Pastor Steve [EMAIL PROTECTED] wrote: Greetings, I am attempting to put the results of a ³while² loop into a variable. Example: $result = mysql_query(³SELECT filename, page_title FROM table²); while ($row = mysql_fetch_assoc($result)) {

RE: [PHP] Reverse Engineering of Smarty

2006-02-06 Thread Finner, Doug
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Sunday, February 05, 2006 2:47 PM To: [EMAIL PROTECTED] Cc: PHP-General Subject: Re: [PHP] Reverse Engineering of Smarty On Sun, 2006-02-05 at 01:12, Sumeet wrote: Rory Browne wrote: If you don't have backups,

RE: [PHP] Results In Variable

2006-02-06 Thread Arno Kuhl
Or just append it... Example: $var = ; $result = mysql_query(³SELECT filename, page_title FROM table²); while ($row = mysql_fetch_assoc($result)) { $var .= a href=\²$htmldir{$row[Œfilename¹]}\²{$row[Œpage_title¹]}/abr /; } echo $var; Arno

Re: [PHP] how to show 6 randomly selected featured products?

2006-02-06 Thread afan
I think(hope :)) I got it right: table products prod_id is primary key table prices price_id is primary key prod_id is foreign key table categories_has_products (since one product can be in more then one category, I have this table with only two columns: cat_id and prod_id, to link

[PHP] LIMIT?

2006-02-06 Thread William Stokes
Hello I have a news page which is getting quite long now and I would like to split the news to two pages. Now I have one SQL query for all the rows and I think I could use LIMIT to limit the results but how to limit the results for example to 15 rows for page one and from 16 to the last on

Re: [PHP] LIMIT?

2006-02-06 Thread Larry E. Ullman
I have a news page which is getting quite long now and I would like to split the news to two pages. Now I have one SQL query for all the rows and I think I could use LIMIT to limit the results but how to limit the results for example to 15 rows for page one and from 16 to the last on second

RE: [PHP] LIMIT?

2006-02-06 Thread Albert
William Stokes wrote: One page one there's headline and short summary and the second page should be archive with only the headline so all remaining rows can be printed to one page. Something like: SELECT * FROM `x_news` LIMIT 0 , 15 but how to do the archive page SELECT * FROM `x_news`

Re: [PHP] LIMIT?

2006-02-06 Thread Andrei
You can use SELECT fields FROM table WHERE condition LIMIT 15, -1 and it will select all from 15... Andy William Stokes wrote: Hello I have a news page which is getting quite long now and I would like to split the news to two pages. Now I have one SQL query for all the rows and I

Re: [PHP] can't output sql query with php code.

2006-02-06 Thread Jay Paulson
It always helps to have a different point of view to look at code sometimes. Else you'll go bonkers looking for that stupid semi-colon! :) On 2/6/06 2:18 AM, Paul Goepfert [EMAIL PROTECTED] wrote: Thanks everyone for your help. I should have seen the semi-colon at the end of the while

[PHP] Get recursive array

2006-02-06 Thread Bruno B B Magalhães
Hi guys.. well I have a little problem, I succeeded on retrieving a value by it's key, but I want a clean and faster method... Let me explain: I have the following function which I use to set variables in my framework like (configs, requests, etc)...

[PHP] Help Defending against Email Injection Attacks

2006-02-06 Thread Greg Schnippel
Has anyone developed a really good defense against email injection attacks? I'm waging a prolonged campaign against these luser hordes on a number of non-profit sites I help maintain. I've tried to secure all of the feedback forms using the function below that I cobbled together from various php

RE: [PHP] Help Defending against Email Injection Attacks

2006-02-06 Thread Jim Moseby
- The most foolproof solution I can think of would be to continue logging the successful entries to a database and _not_ send the email. That way even if they get through, no emails get sent. The form would log the feedback and send an email to the admin that a comment is available for

[PHP] Get recursive array

2006-02-06 Thread Bruno B B Magalhães
Hi guys.. well I have a little problem, I succeeded on retrieving a value by it's key, but I want a clean and faster method... Let me explain: I have the following function which I use to set variables in my framework like (configs, requests, etc)...

[PHP] Making Php Libraries

2006-02-06 Thread Christopher Taylor
I am new to this list so forgive me if this has already been addressed. What I would like to do is keep a library of php scripts on my site. I would like customer sites to call the functions in my library, but have their server do the work. I would like to keep the proprietary code off of

Re: [PHP] Help Defending against Email Injection Attacks

2006-02-06 Thread John Hinton
Greg Schnippel wrote: Has anyone developed a really good defense against email injection attacks? I'm waging a prolonged campaign against these luser hordes on a number of non-profit sites I help maintain. I've tried to secure all of the feedback forms using the function below that I cobbled

Re: [PHP] Get recursive array

2006-02-06 Thread Jochem Maas
Bruno B B Magalhães wrote: Hi guys.. well I have a little problem, I succeeded on retrieving a value by it's key, but I want a clean and faster method... Let me explain: I have the following function which I use to set variables in my framework like (configs, requests, etc)...

Re: [PHP] Get recursive array

2006-02-06 Thread Jochem Maas
Bruno B B Magalhães wrote: Hi guys.. thanks for the echo, Bruno-o-o-o-o-o-o :-) not having had an answer inside of half an hour is no reason to don't double post your question - please be patient. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Help Defending against Email Injection Attacks

2006-02-06 Thread Russell Jones
Why dont you just break the code. Before anything goes through replace colons with dashes, dashes with underscores, etc. Stuff that will not mess up readability but would prevent it from being parsed by the mail function. On 2/6/06, Jim Moseby [EMAIL PROTECTED] wrote: - The most foolproof

Re: [PHP] Sound

2006-02-06 Thread Paul Novitski
At 07:15 AM 2/5/2006, tedd wrote: Does anyone know a way to generate a sound (bell, click, tone, peep, buzz, word) from php? Hi Tedd, I was about to tell you that ringing a bell from PHP wasn't possible, since PHP is executed on the server, but I searched for http://php.net/bell and found

Re: [PHP] Making Php Libraries

2006-02-06 Thread Jochem Maas
Christopher Taylor wrote: I am new to this list so forgive me if this has already been addressed. What I would like to do is keep a library of php scripts on my site. I would like customer sites to call the functions in my library, but have their server do the work. I would like to keep the

[PHP] Re: Sound

2006-02-06 Thread Barry
tedd wrote: Hi gang: Does anyone know a way to generate a sound (bell, click, tone, peep, buzz, word) from php? tedd Not client side, only serverside. Clientside you have some options like html WAV files and javascript probably. The browser dont supports audio output (i dont know any

Re: [PHP] Making Php Libraries

2006-02-06 Thread Christopher Taylor
Jochem Maas wrote: search for 'php encoder' and use one (some cost money). I believe that the php encoder keeps the syntax but changes the variable names to make it less readable. I am not sure if this is enough. changing an file extension from 'php' to 'inc' does nothing to protect your

Re: [PHP] Help Defending against Email Injection Attacks

2006-02-06 Thread Liam Delahunty
On 2/6/06, Jim Moseby wrote: Is it time to abandon using mail() for all user contributed data? Sort of. Don't write any user input to the headers. Send the data to a default address, don't include anything in the subject or the headers from the input and you'll avoid the problems. -- Kind

Re: [PHP] Help Defending against Email Injection Attacks

2006-02-06 Thread Stut
Greg Schnippel wrote: Has anyone developed a really good defense against email injection attacks? I've implemented a complex algorithm to help prevent this problem. Every form I have has a text field with a random name surrounded by the text... If you are human please enter 'human'

[PHP] UK Only - Freelance PHP developer required

2006-02-06 Thread Richard Davey
Hi, I know this message is probably going to flood my inbox with agency crap and 'offshore' development ads, but hopefully something good will come of it: If you are based in the UK and provide freelance PHP development, and **have some availability** then please send me an email with a

Re: [PHP] Submitting form without JavaScript

2006-02-06 Thread Gerry Danen
You should talk to your provider. PayPal does not leave anything legible on my html page, just an encrypted string. Once you end up on PayPal's secure page, the email address is visible. I use a special account, just for that purpose. I'm afraid your provider dictates your solution... Gerry On

[PHP] large files and readfile

2006-02-06 Thread Daniel Bondurant
I am using php and readfile() to control the download of large files; These files can be up to 1GB.There is nothing really exciting or special about the script itself. The problem I am running into is php is loading the entire file into apache's memory as the file is being read - this

[PHP] APD generates no output

2006-02-06 Thread Gustavo Narea
Hello everybody. I'm trying to use the Advanced PHP Debugger (APD), but it generates no output. Actually, It does generate a file, but with no content. What's going on? 1.- I installed the APD by running `pear install APD` with no problem. 2.- Setup my php.ini file the same way as described

Re: [PHP] Making Php Libraries

2006-02-06 Thread Paul Novitski
At 08:34 AM 2/6/2006, Christopher Taylor wrote: I only changed the file extension as an experiment. I understand that the changing of the file extension does nothing for security, but it does allow the functions residing on my site to be read and executed on the client's server. Chris,

Re: [PHP] Making Php Libraries

2006-02-06 Thread tedd
I am new to this list so forgive me if this has already been addressed. What I would like to do is keep a library of php scripts on my site. I would like customer sites to call the functions in my library, but have their server do the work. I would like to keep the proprietary code off of

[PHP] Re: Get recursive array

2006-02-06 Thread Bruno B B Magalhães
Hi Jochem, well, thanks for the code... it's working perfect, but it seams a little bit slow as it's using while... doesn't? Now, abusing of you, how can I unset a variable the same recursive way? :D Maybe like this? /

[PHP] Recompile PHP on pre-installed system

2006-02-06 Thread Justin Cook
Before I came to my company, they created a Redhat server for our web server. Of course they let the redhat installer install PHP. It all works great but now I need to compile a module into php. Is this possible to do without causing havok? Bascially we really can't have more downtime that it

[PHP] mail problem

2006-02-06 Thread PHP
Hi, I upgraded to apache 2.2 and php5, now all my mail() functions return false. But there is nothing in the logs as to why it failed. sendmail is in the path. Has something else changed that won't let mail() run? Thanks. No virus found in this outgoing message. Checked by AVG Free

[PHP] Window close.

2006-02-06 Thread tedd
Hi: This might seem like a odd question, but in php I can leave a script by exit; But, how can I also close the html page that contains the script? I know that I can close the page many different ways via a user actions, but how can I close it from within a conditional php statement?

Re: [PHP] mail problem

2006-02-06 Thread PHP
I also noticed there is no /usr/local/lib/php/Mail directory anymore, should there be with php5? - Original Message - From: PHP To: php Sent: Monday, February 06, 2006 10:35 AM Subject: [PHP] mail problem Hi, I upgraded to apache 2.2 and php5, now all my

Re: [PHP] LIMIT?

2006-02-06 Thread James Kaufman
On Mon, Feb 06, 2006 at 05:08:59PM +0200, Andrei wrote: You can use SELECT fields FROM table WHERE condition LIMIT 15, -1 and it will select all from 15... Andy William Stokes wrote: Hello I have a news page which is getting quite long now and I would like to split the news

[PHP] [Problem] - reading file

2006-02-06 Thread Labunski
Hello, The problem is, that script outputs Last line from the file (and not first line, as expected)! 4 hours spent seeking for mistake. Hopeless. The script should read all the filenames in the directory, then open each file to read first line from file and output this line.

RE: [PHP] Window close.

2006-02-06 Thread Jim Moseby
Hi: This might seem like a odd question, but in php I can leave a script by exit; But, how can I also close the html page that contains the script? I know that I can close the page many different ways via a user actions, but how can I close it from within a conditional php

RE: [PHP] Window close.

2006-02-06 Thread Jay Blanchard
[snip] This might seem like a odd question, but in php I can leave a script by exit; But, how can I also close the html page that contains the script? I know that I can close the page many different ways via a user actions, but how can I close it from within a conditional php statement?

[PHP] get me off

2006-02-06 Thread Chandler Zwolle
stop i hate ur mailing list and i cant get off -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Window close.

2006-02-06 Thread Sumeet
tedd wrote: Hi: This might seem like a odd question, but in php I can leave a script by exit; But, how can I also close the html page that contains the script? I know that I can close the page many different ways via a user actions, but how can I close it from within a conditional php

Re: [PHP] LIMIT?

2006-02-06 Thread John Nichel
James Kaufman wrote: On Mon, Feb 06, 2006 at 05:08:59PM +0200, Andrei wrote: You can use SELECT fields FROM table WHERE condition LIMIT 15, -1 and it will select all from 15... Andy William Stokes wrote: Hello I have a news page which is getting quite long now and I would like to

Re: [PHP] get me off

2006-02-06 Thread John Nichel
Chandler Zwolle wrote: stop i hate ur mailing list and i cant get off PEBKAC -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] get me off

2006-02-06 Thread Jay Blanchard
[snip] stop i hate ur mailing list and i cant get off [/snip] Hate is a pretty strong word there Skipper. See this? To unsubscribe, visit: http://www.php.net/unsub.php Click on the link and follow the instructions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] LIMIT?

2006-02-06 Thread Joe Henry
On Feb 6, 2006, at 12:11 PM, James Kaufman wrote: Answers that show SQL commands that apply to specific databases annoy me. Not everyone uses MySQL. I've worked with several databases that don't support a LIMIT command. At least mention the database engine you are referencing. Response like

RE: [PHP] get me off

2006-02-06 Thread Jim Moseby
stop i hate ur mailing list and i cant get off -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Why did you join? Notice the To unsubscribe, visit: http://www.php.net/unsub.php; at the bottom of every message here. Thats a clue

Re: [PHP] large files and readfile

2006-02-06 Thread James Kaufman
On Mon, Feb 06, 2006 at 09:21:22AM -0800, Daniel Bondurant wrote: I am using php and readfile() to control the download of large files; These files can be up to 1GB.There is nothing really exciting or special about the script itself. The problem I am running into is php is loading

Re: [PHP] get me off

2006-02-06 Thread Richard Davey
On 6 Feb 2006, at 19:20, Chandler Zwolle wrote: stop i hate ur mailing list and i cant get off Your sexual issues are of no interest to us. Cheers, Rich -- http://www.corephp.co.uk Zend Certified Engineer PHP Development Services -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Window close.

2006-02-06 Thread James Kaufman
On Mon, Feb 06, 2006 at 02:05:55PM -0500, tedd wrote: Hi: This might seem like a odd question, but in php I can leave a script by exit; But, how can I also close the html page that contains the script? I know that I can close the page many different ways via a user actions, but how

RE: [PHP] get me off

2006-02-06 Thread Jim Moseby
[snip] stop i hate ur mailing list and i cant get off [/snip] Hate is a pretty strong word there Skipper. See this? To unsubscribe, visit: http://www.php.net/unsub.php Click on the link and follow the instructions. I'm sure someone who cannot use punctuation or proper case will

Re: [PHP] large files and readfile

2006-02-06 Thread Richard Davey
On 6 Feb 2006, at 17:21, Daniel Bondurant wrote: I am using php and readfile() to control the download of large files; These files can be up to 1GB.There is nothing really exciting or special about the script itself. The problem I am running into is php is loading the entire file

Re: [PHP] get me off

2006-02-06 Thread Austin Denyer
On Mon, 06 Feb 2006 14:20:26 -0500 Chandler Zwolle [EMAIL PROTECTED] wrote: stop i hate ur mailing list and i cant get off -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Try one or more of the following: 1. The unsubscribe link that

[PHP] Re: REMOVE ME

2006-02-06 Thread Mark Galbreath
This list is like the Hotel California - you can check in, but you can never leave. muhahahaha. [EMAIL PROTECTED] 03-Feb-06 14:54:04 PM This is the 5th time... REMOVE ME

[PHP] php / mysqli problem

2006-02-06 Thread jonathan
I have a couple of questions about php and accessing mysql 4.1 via the mysqli interface. I get the following warning on a script: bWarning/b: mysqli::mysqli() [a href='function.mysqli/a]: User jt_select has already more than 'max_user_connections' active connections in but this

Re: [PHP] Sound

2006-02-06 Thread Miles Thompson
At 12:17 PM 2/6/2006, Paul Novitski wrote: At 07:15 AM 2/5/2006, tedd wrote: Does anyone know a way to generate a sound (bell, click, tone, peep, buzz, word) from php? Hi Tedd, I was about to tell you that ringing a bell from PHP wasn't possible, since PHP is executed on the server, but I

Re: [PHP] Window close.

2006-02-06 Thread Paul Novitski
At 11:05 AM 2/6/2006, tedd wrote: This might seem like a odd question, but in php I can leave a script by exit; But, how can I also close the html page that contains the script? I know that I can close the page many different ways via a user actions, but how can I close it from within a

[PHP] Flash Email Issues

2006-02-06 Thread Tom Haschenburger
Could someone tell me if I am doing this correctly? For some reason, my mailer stops working after a few months. It doesn't get used all that often so, I check it every few months to make sure it works. Here is the script. I have this script working on another site hosted by the same company

Re: [PHP] Window close.

2006-02-06 Thread tedd
To all: Thanks for all your replies. I realize and understand that php is server-side -- however, with that said -- there ARE ways around some barriers such as using javascript, which can be delivered via php. Granted not all users have javascript installed, but for what I'm doing, I know my

[PHP] Missing characters

2006-02-06 Thread Fernando Anchorena
I need a helping hand to solve this Example Page1.php === $name_pro = VC++ V2.4 print td width='200' class='texto2' a href='page2.php?page=value=$name_pro' $name_pro /a /td; ===

RE: [PHP] Missing characters

2006-02-06 Thread Brady Mitchell
Example Page1.php === $name_pro = VC++ V2.4 print td width='200' class='texto2' a href='page2.php?page=value=$name_pro' $name_pro /a/td; Use urlencode (http://php.net/urlencode): print td width='200' class='texto2' a

[PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
Hi all- is there a way have a large data result set from MySQL compressed? E.g. I have a table with over a million rows of data that I want to do a select * from on and then take that result, do some field/data manpulation, and then insert row-by-row to another table. The problem is the result

Re: [PHP] Missing characters

2006-02-06 Thread Tom Rogers
Hi, Tuesday, February 7, 2006, 9:01:18 AM, you wrote: FA I need a helping hand to solve this FA Example FA Page1.php FA === FA $name_pro = VC++ V2.4 FA print td width='200' class='texto2' a FA href='page2.php?page=value=$name_pro'

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Geoff
On 6 Feb 2006 at 16:03, David Yee wrote: Hi all- is there a way have a large data result set from MySQL compressed? E.g. I have a table with over a million rows of data that I want to do a select * from on and then take that result, do some field/data manpulation, and then insert row-by-row

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Chris
Hi David, See http://www.php.net/mysql_unbuffered_query It won't load the whole lot into memory before returning it to php. David Yee wrote: Hi all- is there a way have a large data result set from MySQL compressed? E.g. I have a table with over a million rows of data that I want to do a

[PHP] Re: Missing characters

2006-02-06 Thread David Dorward
Fernando Anchorena wrote: I need a helping hand to solve this $name_pro = VC++ V2.4 print td width='200' class='texto2' a href='page2.php?page=value=$name_pro' $name_pro /a /td; 1: Ampersands have special meaning in HTML and must be represented by entities (for the same reason

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
Thanks guys- I think I'll have to do multiple queries using LIMIT as Geoff suggested since apparently mysql_unbuffered_query() would lose the result set of the select * from query once I run the insert query. I'm still not sure why the MYSQL_CLIENT_COMPRESS didn't seem to have an effect, however.

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread Robert Cummings
On Mon, 2006-02-06 at 19:39, David Yee wrote: I'm still not sure why the MYSQL_CLIENT_COMPRESS didn't seem to have an effect That causes the data to be transfered from the MySQL server to the client with compression. The results are still uncompressed on the client. Cheers, Rob. --

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Chris
Hi David, From the comments on unbuffered_query: However, when using different db connections, it all works ofcource ... So create a second db connection and when you run the insert use that instead: $result2 = mysql_query(insert blah, $dbconnection_two); client-compress will compress the

[PHP] Is this the most effient to do with php an mysql?

2006-02-06 Thread Paul Goepfert
Hi all, I have a table of years going from 1985 - 2008. These years represent the purchase year. I have created a SQL statement that selects the years that are available for purchase years. For example 2006 -1985. Here is the SQL statement I created to produce that output. SELECT y_id, year

[PHP] PHP4 VS PHP5 Performance

2006-02-06 Thread Ray Hauge
Hello all, I've been poking around a little bit, and I haven't found a good link for showing the performance differences between the two versions of PHP. Mostly I was just curious what the numbers were. I've heard some conflicting opinions on the matter, and wanted to clear it up with some

RE: [PHP] PHP mysql data result set compression

2006-02-06 Thread David Yee
Thanks guys for clarifying the compression aspect. Using mysql_unbuffered_query w/ multipe conenctions sounds nice and simple- though would this method mean more disk access than multiple limit queries? As far as speed goes I imagine if I load as big of a dataset as possible into physical memory

Re: [PHP] PHP mysql data result set compression

2006-02-06 Thread Chris
There's only one way to find out :) David Yee wrote: Thanks guys for clarifying the compression aspect. Using mysql_unbuffered_query w/ multipe conenctions sounds nice and simple- though would this method mean more disk access than multiple limit queries? As far as speed goes I imagine if I

Re: [PHP] LIMIT?

2006-02-06 Thread Chris
Hi, Just because it supports the keyword 'limit' doesn't mean much. mysql does: select * from table limit x,y; postgresql does: select * from table limit y offset x; different syntax. John Nichel wrote: James Kaufman wrote: On Mon, Feb 06, 2006 at 05:08:59PM +0200, Andrei wrote: You can

Re: [PHP] [Problem] - reading file

2006-02-06 Thread Chris
Hi Roman, This line is your problem. $lines = preg_replace(/\n/, br, $lines); You're replacing your newlines with br tags. Your explode won't find anything because it's looking for \n 's. Labunski wrote: Hello, The problem is, that script outputs Last line from the file (and not first

Re: [PHP] mail problem

2006-02-06 Thread Chris
Hi, Is there a /usr/sbin/sendmail file on the server? php looks for this when it compiles, if it's not there then mail() won't work. (check a phpinfo page as well and look for sendmail_path). PHP wrote: I also noticed there is no /usr/local/lib/php/Mail directory anymore, should there be

RE: [PHP] Is this the most effient to do with php an mysql?

2006-02-06 Thread Peter Lauri
I do not know if it is more efficient, but you can do this: $year = date(Y); $Query = sprintf(SELECT y_id, year FROM Year WHERE year = %s ORDER BY year DESC;, $year); $Result = mysql_query($Query); May I ask you what you are using this table for? /Peter -Original Message- From: Paul

Re: [PHP] LIMIT?

2006-02-06 Thread John Nichel
Chris wrote: Hi, Just because it supports the keyword 'limit' doesn't mean much. mysql does: select * from table limit x,y; postgresql does: select * from table limit y offset x; different syntax. Because it makes the thread harder to read. Why is top posting bad? Anywho, A) I said that

Re: [PHP] Missing characters [SOLVED]

2006-02-06 Thread Fernando Anchorena
Thanks to all.. Regards, FA. Brady Mitchell wrote: Example Page1.php === $name_pro = VC++ V2.4 print td width='200' class='texto2' a href='page2.php?page=value=$name_pro' $name_pro /a/td; Use urlencode

[PHP] out of dynamic memory

2006-02-06 Thread Mascker
Hi, Already search in the whole world, except here :D. When i access to some pages on my web site i get this error Fatal error: out of dynamic memory in yy_create_buffer() in Unknown on line 0 This maybe a memory problem, but it happens in pages that have just one connection to db and get a

Re: [PHP] Help Defending against Email Injection Attacks

2006-02-06 Thread Chris
Greg Schnippel wrote: Has anyone developed a really good defense against email injection attacks? snip A bit late but this is a good guide: http://securephp.damonkohler.com/index.php/Email_Injection -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Is this the most effient to do with php an mysql?

2006-02-06 Thread Paul Goepfert
I am using this table to find out what year the person purchased their equipment On 2/6/06, Peter Lauri [EMAIL PROTECTED] wrote: I do not know if it is more efficient, but you can do this: $year = date(Y); $Query = sprintf(SELECT y_id, year FROM Year WHERE year = %s ORDER BY year DESC;,

Re: [PHP] Is this the most effient to do with php an mysql?

2006-02-06 Thread Ligaya Turmelle
using mysql is better then using php. SELECT y_id, year FROM Year WHERE year = year(curdate) ORDER BY year desc; Paul Goepfert wrote: Hi all, I have a table of years going from 1985 - 2008. These years represent the purchase year. I have created a SQL statement that selects the years that

  1   2   >