php-general Digest 24 Mar 2005 12:52:14 -0000 Issue 3356

2005-03-24 Thread php-general-digest-help
php-general Digest 24 Mar 2005 12:52:14 - Issue 3356 Topics (messages 211429 through 211454): Preorder Modified Tree Traversal 211429 by: Matt Babineau 211434 by: Burhan Khalid Re: Apache user can't use exec(), passthru(), etc. 211430 by: Jim Poserina 211432

[PHP] Re: executed script URL

2005-03-24 Thread Michal Kozusznik
Hello Rasmus answered this question a week or two ago. Search the archives for 'getenv request' and you will likely find the answer. I found something (in last 3000 posts) but it says about getenv('REMOTE_ADDR'). My problem is how to get an URL of executed script in always working way,

[PHP] Re: Memory use

2005-03-24 Thread M. Sokolewicz
Joe Wollard wrote: Greetings, I'm trying to help a C programmer understand and use PHP for web development. So far all the similarities between C++ and PHP are making the process rather speedy. He asked what seemed like a very simple question, but I couldn't find the answer. The questions is

[PHP] SQL statement - please help

2005-03-24 Thread Jacques
Dear all Please, I realy need your help. I am trying to extract only those records that were entered during the past hour from my MySQL database. The following SQL statement extracts all the records. As soon as I change the INTERVAL to 1 HOUR I see all the records in my database. When I

[PHP] file upload

2005-03-24 Thread William Stokes
Hello, I'm (slowly) learning how to make a file upload stuff with php. Now I would like to know how to define the servers upload directory in the code? For example I have the upload script in folder /www in the www.domain.com server and I want upload the files to /www/uploads folder. So how do

Re: [PHP] file upload

2005-03-24 Thread Tristan . Pretty
http://www.hotscripts.com/Detailed/24113.html take a look at this.. perhaps you can reverse engineer it William Stokes [EMAIL PROTECTED] 24/03/2005 09:18 To php-general@lists.php.net cc Subject [PHP] file upload Hello, I'm (slowly) learning how to make a file upload stuff with php.

[PHP] Destroying the Session Object

2005-03-24 Thread Jacques
How can I destroy the session object for a particular user when that user leaves my web site without properly signing out? Jacques -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Listing directory, return none if only one file

2005-03-24 Thread Alexandru Martin
I have a script that lists the files in a directory, but when i have only ONE file , it won't display it ( here is the code : http://www.pastebin.com/262050 ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file upload

2005-03-24 Thread William Stokes
Okl I can't reverse engineer that... I just need to know how to set the path. now I have it like this and it wont work. $fileame comes from a form. if (copy($filename, /imagedir/ . $filename_name)) print H2upload succesful!/H2; Tristan Pretty [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL

[PHP] convert date format

2005-03-24 Thread Angelo Zanetti
hi guys, I need to convert a date from this format: 2005-03-25 to 25 mar 2005. I have tried the mktime, strftime and the date functions but they all take a time stamp but I only have the dates in the format of 2005-03-25. These are what i tried where $row['date'] is 2005-02-24 but they all

Re: [PHP] file upload

2005-03-24 Thread William Stokes
Never mind. I got that sorted out! Thanks anyway... -Will William Stokes [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] Okl I can't reverse engineer that... I just need to know how to set the path. now I have it like this and it wont work. $fileame comes from a form. if

Re: [PHP] convert date format-SOLVED

2005-03-24 Thread Angelo Zanetti
Hi guys, got it to work: $datearr = split('-', $row['date']); $tstamp = mktime(0,0,0,$datearr[1],$datearr[2],$datearr[0]); $myformat = date('j M Y',$tstamp); echo 'myformat: ' . $myformat; hope this can help others!! Angelo Angelo Zanetti wrote: hi guys, I need to convert a date from this format:

Re: [PHP] convert date format-SOLVED

2005-03-24 Thread Chris Ramsay
Angelo, slightly OT , but as a point of interest perhaps, $row['date'] seemed to indicate that your date comes out of a DB - you can date format stuff with sql too - I find that useful sometimes... With MySQL for example, if your date field is called 'myDate' you can do the following in the

Re: [PHP] convert date format-SOLVED

2005-03-24 Thread Angelo Zanetti
yeah i know but its used for other calculations thats why i format it with PHP!! thanks anyway Chris Ramsay wrote: Angelo, slightly OT , but as a point of interest perhaps, $row['date'] seemed to indicate that your date comes out of a DB - you can date format stuff with sql too - I find that

[PHP] Re: SQL statement - please help

2005-03-24 Thread Jason Barnett
Try a MySQL list. Or possibly even php-db. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY |

[PHP] Re: Destroying the Session Object

2005-03-24 Thread Jason Barnett
Jacques wrote: How can I destroy the session object for a particular user when that user leaves my web site without properly signing out? Jacques The most important part of this is garbage collection. You can't really know for 100% sure that a user has left without properly signing out, but

Re: [PHP] Listing directory, return none if only one file

2005-03-24 Thread Forest Liu
it's better for getting help if you could show your code. On Thu, 24 Mar 2005 12:15:11 +0200, Alexandru Martin [EMAIL PROTECTED] wrote: I have a script that lists the files in a directory, but when i have only ONE file , it won't display it ( here is the code : http://www.pastebin.com/262050

Re: [PHP] Listing directory, return none if only one file

2005-03-24 Thread Jason Barnett
Forest Liu wrote: it's better for getting help if you could show your code. He did show his code, he even put it in one of those nice pastebin sites! Hurrah! On Thu, 24 Mar 2005 12:15:11 +0200, Alexandru Martin [EMAIL PROTECTED] wrote: I have a script that lists the files in a directory,

RE: [PHP] SQL statement - please help

2005-03-24 Thread Jay Blanchard
[snip] $sql = Select tblchatglobal.cgid, tblchatglobal.cgdateposted, tblchatglobal.cgtimeposted, tblchatglobal.uid, tblchatglobal.cgmsg, tblusers.uid, tblusers.uusername from tblchatglobal, tblusers where (tblchatglobal.uid = tblusers.uid) and (DATE_SUB(CURDATE(),INTERVAL 1 HOUR) =

[PHP] Q: static method working in PHP4 and PHP5

2005-03-24 Thread Piotr Klaban
Hi, An example script: ?php error_reporting(4095); class Foo { function test() { } } Foo::test(); ? would produce in PHP5 error: PHP Strict Standards: Non-static method Foo::test() should not be called statically in ... line 8 I have two questions: 1. Could it be possible that

Re: [PHP] SQL statement - please help

2005-03-24 Thread Tom Rogers
Hi, Thursday, March 24, 2005, 6:50:38 PM, you wrote: J Dear all J Please, I realy need your help. I am trying to extract only those records J that were entered during the past hour from my MySQL database. The J following SQL statement extracts all the records. As soon as I change the J

[PHP] Re: Q: static method working in PHP4 and PHP5

2005-03-24 Thread M. Sokolewicz
Piotr Klaban wrote: Hi, An example script: ?php error_reporting(4095); class Foo { function test() { } } Foo::test(); ? would produce in PHP5 error: PHP Strict Standards: Non-static method Foo::test() should not be called statically in ... line 8 I have two questions: 1. Could it be

Re: [PHP] NetFlix Drag and Drop Row Ordering

2005-03-24 Thread Martin . C . Austin
I don't see anything special about my Netflix queue. Am I missing something there? And I have no idea what Flex is referring to, so I'll check that out if anyone lets me know where. :o) Martin Austin Burhan Khalid [EMAIL PROTECTED] 03/24/2005 12:27 AM To: Graham Anderson

[PHP] checkbox value

2005-03-24 Thread William Stokes
Hello, I have a checkbox in a form. How can I determine if the user has set the checkbox on or not? Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Listing directory, return none if only one file

2005-03-24 Thread Tom Rogers
Hi, Thursday, March 24, 2005, 8:15:11 PM, you wrote: AM I have a script that lists the files in a directory, but when i have AM only ONE file , it won't display it ( here is the code : AM http://www.pastebin.com/262050 ) After you sort the $filename array its index changes from 1 to 0 so your

Re: [PHP] checkbox value

2005-03-24 Thread Ken
isset($_POST['checkboxname']) or isset($_GET['checkboxname']) depending on the method of your form. a good thing to do is to do var_dump($_POST) or var_dump($_GET) to see all the values posted from the form... hth ken On Thu, 24 Mar 2005 15:42:10 +0200, William Stokes [EMAIL PROTECTED] wrote:

Re: [PHP] convert date format

2005-03-24 Thread Ken
try preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}))#', $row['date'], $matches); $month = array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); $converted_date = $matches[3]. .$month[$matches[2]]. .$matches[1]; untested... On Thu, 24 Mar 2005

[PHP] if statement probable bug

2005-03-24 Thread TheI2eptile
Probably this is the wrong place to put this but I couldn't search for the bug and what I saw in the bugs newsgroup was a bit strange and seem to be a log for the bugs forms. So here is what I would call a bug, but maybe it's thought to be so: ?php $var1 = 0; $var2 = AS; if($var1 == AS){

[PHP] if statement probable bug

2005-03-24 Thread TheI2eptile
Probably this is the wrong place to put this but I couldn't search for the bug and what I saw in the bugs newsgroup was a bit strange and seem to be a log for the bugs forms. So here is what I would call a bug, but maybe it's thought to be so: ?php $var1 = 0; $var2 = AS; if($var1 == AS){

[PHP] delete file

2005-03-24 Thread William Stokes
Hello, How can I let user delete a uploaded image file in the server's directory? Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] if statement probable bug

2005-03-24 Thread Richard Davey
Hello TheI2eptile, Thursday, March 24, 2005, 2:05:14 PM, you wrote: T So here is what I would call a bug, but maybe it's thought to be so: Try it with strict (data-type) comparisons, i.e.: if ($var === AS) Then you won't get the bug. Best regards, Richard Davey --

RE: [PHP] delete file

2005-03-24 Thread Jay Blanchard
[snip] How can I let user delete a uploaded image file in the server's directory? [/snip] http://www.php.net/unlink -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] delete file

2005-03-24 Thread Richard Davey
Hello William, Thursday, March 24, 2005, 2:08:13 PM, you wrote: WS How can I let user delete a uploaded image file in the server's WS directory? unlink() Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them.

Re: [PHP] checkbox value

2005-03-24 Thread [EMAIL PROTECTED]
# index.php form method=post action=index.php ?php $checked = ($_POST['CheckThis'] == 'Yes') ? 'checked' : '' ; input type=checkbox name=CheckThis value=Yes ?= $checked ? input type=Submit value=Submit /form -afan William Stokes wrote: Hello, I have a checkbox in a form. How can I determine if

Re: [PHP] if statement probable bug

2005-03-24 Thread Jochem Maas
TheI2eptile wrote: Probably this is the wrong place to put this but I couldn't search for not at all the wrong place, having said that the only thing probable with regard to you/your post is that you are not fully aware of the nature of data types in php and the way auto-typecasting works (in

RE: [PHP] NetFlix Drag and Drop Row Ordering

2005-03-24 Thread Nathan Tobik
I've used drag and drop row ordering before. The only PHP I used was to read a record set and write it out for the different items. The piece of code I used worked with JavaScript and html. Basically there was a large div, and each element inside of the main div was a div. It grabbed the

Re: [PHP] count with match probelm

2005-03-24 Thread Jochem Maas
Richard Lynch wrote: ... $how_many = mysql_result(mysql_query(SELECT COUNT(*), MATCH(ad_sub, ad_text) AGAINST('$words') AS score from .$tcname.ads WHERE MATCH(ad_sub, ad_text) AGAINST('$words') FROM .$tcname.ads where is_confirmed=1),0); H. Actually, I *can* tell you that you shouldn't have

[PHP] How can I destroy parameters by page

2005-03-24 Thread Tomás Rodriguez Orta
Hello friends. IHow Can I destroy some variable that I pass by url, exmple: http://webadmin/paginas/personalidades.php?ac2=deleteitem=18# then when i get the varibale ac2 and item, I want to delete the value of this variable. how can I do? regards TOMAS

[PHP] Meed a multiple merchant shopping cart please

2005-03-24 Thread Denis L. Menezes
Hi. I am looking for a shopping cart where we can have teh following : 1. Multiple vendors on our site, 2. Have accounts for all these vendors on how much sales, profits etc for each seller. 3. Have a delivery module 4. Warehouse inventory 5. Customer complaints Can anyone suggest a good PHP

Re: [PHP] Meed a multiple merchant shopping cart please

2005-03-24 Thread [EMAIL PROTECTED]
freshmeat.net and search shopping carts check X-Cart (x-cart.com) - shopping mall version (I think it's xcart pro ili something like that) -afan Denis L. Menezes wrote: Hi. I am looking for a shopping cart where we can have teh following : 1. Multiple vendors on our site, 2. Have accounts for

RE: [PHP] How can I destroy parameters by page

2005-03-24 Thread Jay Blanchard
[snip] IHow Can I destroy some variable that I pass by url, exmple: http://webadmin/paginas/personalidades.php?ac2=deleteitem=18# then when i get the varibale ac2 and item, I want to delete the value of this variable. how can I do? [/snip] http://www.php.net/unset -- PHP General Mailing List

Re: [PHP] How can I destroy parameters by page

2005-03-24 Thread Tomás Rodriguez Orta
I sorry I can't destroy of value variable by pass url I try this. unset($_SERVER['QUERY_STRING']); but the url have the same value. don't delete this value. what can i do? somebody can help me. regards TOMAS - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Tomás Rodriguez

[PHP] XHTML to pdf converter

2005-03-24 Thread symbulos partners
Dear friends, after an research on the subject, I have not been able to find an open source converter from XHTML to pdf, with full suport for CSS, with full support for tables. Is there anything like that out there that yu know about? -- symbulos partners -.- symbulos - ethical services for

RE: [PHP] Preorder Modified Tree Traversal

2005-03-24 Thread Chris W. Parker
Burhan Khalid mailto:[EMAIL PROTECTED] on Wednesday, March 23, 2005 10:25 PM said: Sitepoint has a great article that has PHP snippets on both pmtt and the flat drill-down method. http://www.sitepoint.com/article/hierarchical-data-database I would like to add that this is the article

RE: [PHP] How can I destroy parameters by page

2005-03-24 Thread Chris W. Parker
Tomás Rodriguez Orta mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 12:19 PM said: IHow Can I destroy some variable that I pass by url, exmple: http://webadmin/paginas/personalidades.php?ac2=deleteitem=18# then when i get the varibale ac2 and item, I want to delete the value of this

Re: [PHP] How can I destroy parameters by page

2005-03-24 Thread M. Sokolewicz
how about... just leave it? Why do you need to destroy it anyway? :S Tomás Rodriguez Orta wrote: I sorry I can't destroy of value variable by pass url I try this. unset($_SERVER['QUERY_STRING']); but the url have the same value. don't delete this value. what can i do? somebody can help me.

[PHP] image problem

2005-03-24 Thread William Stokes
Hello, I really can't figure this out. Can someone help please. I've wasted hours already with this one. I'm trying to print image to a web page using fpassthru. Here's the code: $name = path/to/the/image/folder/img1.jpeg; $fp = fopen($name, 'rb'); // send the right headers

[PHP] Remove rows from a MySQL table?

2005-03-24 Thread Phil Neeb
Is it possible to remove a row(s) from a MySQL table? I looked through the PHP manual and didn't see anything about it. Phil Neeb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Remove rows from a MySQL table?

2005-03-24 Thread Chris W. Parker
Phil Neeb mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 9:35 AM said: Is it possible to remove a row(s) from a MySQL table? I looked through the PHP manual and didn't see anything about it. Use the word delete instead of remove. In any case you have to tell MySQL which records you

RE: [PHP] Converting to a string

2005-03-24 Thread Tyler Replogle
you could just use the time() or numbers of the date function From: PartyPosters [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] Converting to a string Date: Wed, 23 Mar 2005 20:43:30 - MIME-Version: 1.0 Received: from lists.php.net ([216.92.131.4]) by mc10-f11.hotmail.com with

Re: [PHP] Remove rows from a MySQL table?

2005-03-24 Thread John Nichel
Phil Neeb wrote: Is it possible to remove a row(s) from a MySQL table? I looked through the PHP manual and didn't see anything about it. Call me crazy, but the MySQL manual _might_ have something about it. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General

[PHP] collapse SELECT from multiple tables

2005-03-24 Thread David Christensen
I'm trying to figure out the best way to handle a SELECT from multiple tables where a single ID in tableA relates to multiple ID's in tableB: SELECT tableA.ID, tableB.data FROM tableA, tableB WHERE tableA.ID=3 AND tableA.ID=tableB.tableAID What I'm trying to product is an array output similar

[PHP] PHP 5.0.4RC2 rolled

2005-03-24 Thread Zeev Suraski
All, There have been several fixes since RC1. If there are no show stoppers found, we hope to release the final 5.0.4 early next week. Source: http://downloads.php.net/zeev/php-5.0.4RC2.tar.gz http://downloads.php.net/zeev/php-5.0.4RC2.tar.bz2 Windows binaries:

Re: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread John Nichel
David Christensen wrote: snip non php stuff Comeon guys, this is the PHP mailing list. The MySQL mailing list is over on the next block. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] html image

2005-03-24 Thread delos
i would like to produce a script that can make an image (screenshot) based only on the site url. so that i enter an URL and php makes the picture. can such a thing be done by php? if not, maybe by some other language? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] html image

2005-03-24 Thread Stephen Johnson
I have done this sort of thing with PDF's but I have never done it with images. It has also always been a web page that is on my site -- I get the impression that you want to read in someone else's url and do this. I would start off by looking at the ob_start and other related functions. Once

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread Jay Blanchard
[snip] I'm trying to figure out the best way to handle a SELECT from multiple tables where a single ID in tableA relates to multiple ID's in tableB: SELECT tableA.ID, tableB.data FROM tableA, tableB WHERE tableA.ID=3 AND tableA.ID=tableB.tableAID What I'm trying to product is an array output

RE: [PHP] Preorder Modified Tree Traversal

2005-03-24 Thread Matt Babineau
Yeah, I read this article, and it works, but it doesn't set you up for a drill down scenario... Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Chris W. Parker [mailto:[EMAIL PROTECTED] Sent: Thursday, March 24,

Re: [PHP] Remove rows from a MySQL table?

2005-03-24 Thread Phil Neeb
John Nichel wrote: Phil Neeb wrote: Is it possible to remove a row(s) from a MySQL table? I looked through the PHP manual and didn't see anything about it. Call me crazy, but the MySQL manual _might_ have something about it. Oh c'mon, you expect me to go look at a second website? That'd require

Re: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread John Nichel
Jay Blanchard wrote: snip SELECT p.users FROM php.list p LEFT OUTER JOIN mysql.list m ON (p.phpuserid = m.mysqluserid) GROUP BY p.users HAVING clue 0; /snip I got zero results returned. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List

RE: [PHP] Preorder Modified Tree Traversal

2005-03-24 Thread Chris W. Parker
Matt Babineau mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 10:49 AM said: Yeah, I read this article, and it works, but it doesn't set you up for a drill down scenario... I guess I don't understand what you mean then. I can display a tree just fine... Chris. -- PHP General

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread David Christensen
Your example doesn't produce the desired the results! The reason I posted to the PHP list was I thought I would have to apply some ARRAY functions to produce the output I'm looking for. Your example did nothing more than mine produced. On Thu, 2005-03-24 at 12:48 -0600, Jay Blanchard wrote:

[PHP] PhpUnit2 - Unit test framework

2005-03-24 Thread Dipesh Khakhkhar
  Hi, I am trying to use PHPUnit2 package under pear to run unit test for php scripts. Finally after pulling lotta hairs from my head, I am able to run phpunit command line utilty to run test. I am still not sure how to get the result of the test in xml (or text or html) format. phpUnit

Re: [PHP] NetFlix Drag and Drop Row Ordering

2005-03-24 Thread Graham Anderson
thanks for the tip I am pretty unfamilar with javascript.. But for my purposes, I guess I better learn it I am fairly conversant in a couple of languages so hopefully it won't be too bad recommend a good book ? Essentially, I want CMS users to be order their own playlist of multimedia tracks.

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread Chris W. Parker
David Christensen mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 11:24 AM said: Your example doesn't produce the desired the results! The reason I posted to the PHP list was I thought I would have to apply some ARRAY functions to produce the output I'm looking for. Your example

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread Jay Blanchard
[snip] Your example doesn't produce the desired the results! The reason I posted to the PHP list was I thought I would have to apply some ARRAY functions to produce the output I'm looking for. Your example did nothing more than mine produced. [/snip] It produces EXACTLY what you asked for in

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread David Christensen
YES! All it does differently is truncate the output to one row per entry in tableA. On Thu, 2005-03-24 at 11:35 -0800, Chris W. Parker wrote: David Christensen mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 11:24 AM said: Your example doesn't produce the desired the results!

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread David Christensen
NO Spanky! I figured it was implied that I was looking for a PHP solution since I posted to a PHP list! I also didn't ask for help with HTML output. I was asking for help with PHP output! Let me try to explain it a little better... I need to produce an array of results from two tables. The

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread Jay Blanchard
[snip] I figured it was implied that I was looking for a PHP solution since I posted to a PHP list! [/snip] Bad assumption. [snip] I also didn't ask for help with HTML output. I was asking for help with PHP output! [/snip] I did it with PHP [snip] Let me try to explain it a little better...

[PHP] Storing Arrays in a database

2005-03-24 Thread Joe Harman
Hey, I was curious if anyone here stores arrays in MySQL... and how r u doing this... are you converting the values to a delimited string or is there another way? Thanks Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread Chris W. Parker
David Christensen mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 12:07 PM said: NO Spanky! I figured it was implied that I was looking for a PHP solution since I posted to a PHP list! I also didn't ask for help with HTML output. I was asking for help with PHP output! Yikes.

RE: [PHP] Storing Arrays in a database

2005-03-24 Thread Chris W. Parker
Joe Harman mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 12:15 PM said: I was curious if anyone here stores arrays in MySQL... and how r u doing this... are you converting the values to a delimited string or is there another way? http://php.net/serialize and

Re: [PHP] Storing Arrays in a database

2005-03-24 Thread [EMAIL PROTECTED]
check serialize() and unserialize() in manual. implode() and explode() functions too. -afan Joe Harman wrote: Hey, I was curious if anyone here stores arrays in MySQL... and how r u doing this... are you converting the values to a delimited string or is there another way? Thanks Joe -- PHP

Re: [PHP] Storing Arrays in a database

2005-03-24 Thread John Nichel
Joe Harman wrote: Hey, I was curious if anyone here stores arrays in MySQL... and how r u doing this... are you converting the values to a delimited string or is there another way? Thanks Joe http://us4.php.net/serialize -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] --

[PHP] Storing Arrays in a database

2005-03-24 Thread Joe Harman
k.. in the past i have been using implode and explode... i have yet to try serialize yet... but i will be giving it a whirled in about 5 minutes... Thanks... just looking for a better way to do things Cheers thanks for the help! Joe On Thu, 24 Mar 2005 14:23:05 -0600, [EMAIL PROTECTED] [EMAIL

Re: [PHP] html image

2005-03-24 Thread Leif Gregory
Hello delos, Thursday, March 24, 2005, 11:48:50 AM, you wrote: d i would like to produce a script that can make an image d (screenshot) based only on the site url. so that i enter an URL d and php makes the picture. Hmmm. It can be done. See http://www.whois.sc/www.php.net But I'm just not sure

[PHP] Problem with header in an if

2005-03-24 Thread Jay Blanchard
/* send the errors to the interface and exit*/ if('' !== $errorsReported){ for($i = 0; $i count($errorsReported); $i++){ echo $errorsReported[$i]; } } else { /* reload the empty interface */

[PHP] Re: Full-text searches sucks?

2005-03-24 Thread Raj Shekhar
Ryan A [EMAIL PROTECTED] writes: Hey, I dont want to do that as its only mysql 4.1+ compatable, IN BOOLEAN MODE was added in version 4.0.1 not 4.1, for what it's worth. Oops, thats what i meant. The problem is a LOT of hosts are still on 3.23.xx so I dont want to do the BOOLEAN

RE: [PHP] NetFlix Drag and Drop Row Ordering

2005-03-24 Thread Nathan Tobik
Here is the code we used at the time: http://dhtmlkitchen.com/scripts/draglib/index.jsp I modified it a bit to meet our needs, if you're doing an open-source project it's free to use. In my experience if you take your time JavaScript can be made to work in any browser. We actually don't use

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread David Christensen
My apologies! I thought I was giving what I was getting as far as the angle of my post. I still don't think everyone is understanding what I'm after here though. I know how to use the mysql functions in PHP. That is not my problem. I'm trying to avoid having to make multiple queries to the db

RE: [PHP] Problem with header in an if

2005-03-24 Thread Chris W. Parker
Jay Blanchard mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 12:34 PM said: I don't know if either of these two things will make a difference but here they are anyway. /* send the errors to the interface and exit*/ if('' !== $errorsReported){ Why not

[PHP] PHP MYSQL table locking

2005-03-24 Thread james tu
I understand table locking with MYSQL. My concern is this. What happens if a php script issues a LOCK, and then somehow crashes without issuing an UNLOCK? All other scripts will not be able to access the LOCKed tables. What is the solution for a situation like this? It will be pretty

Re: [PHP] Problem with header in an if

2005-03-24 Thread dpgirago
/* send the errors to the interface and exit*/ if('' !== $errorsReported){ for($i = 0; $i count($errorsReported); $i++){ echo $errorsReported[$i]; }

RE: [PHP] Problem with header in an if

2005-03-24 Thread Jay Blanchard
[snip] /* send the errors to the interface and exit*/ if('' !== $errorsReported){ for($i = 0; $i count($errorsReported); $i++){ echo $errorsReported[$i];

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread Chris W. Parker
David Christensen mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 12:34 PM said: I don't know how to say it any plainer than that. The original post would have produced the following: 1, 'joe', 'part1' 1, 'joe', 'part2' 1, 'joe', 'part3' but what I'd like to get is: 1,

[PHP] fopen problems

2005-03-24 Thread AJ Lemke
Hello all, I have an install of php on a Red Hat Ent. server that is giving me fits. I have been trying to use the fopen command to retreive files from external sites and have been getting this error: Warning: fopen(http://us3.php.net/images/php.gif): failed to open stream: HTTP request failed!

RE: [PHP] collapse SELECT from multiple tables

2005-03-24 Thread David Christensen
Thanks, I just use my original SQL and setup a foreach loop to compare the 'ID' to see whether or not a record was returned with multiple row results. I was just hoping someone had all ready figured out some kool, neato, voodoo-magic way to handle a one-to-many result like this. On Thu,

[PHP] Storing data structires in DB

2005-03-24 Thread GamblerZG
Output of serialize() is barely readable and definetely is not suited for manual editing. It is quite simple to create var_export() clone that does not add junk to it's output. But then I would need to exec() the string to get a data structure back, which is bad security practice. Is there

RE: [PHP] Problem with header in an if

2005-03-24 Thread Chris W. Parker
Jay Blanchard mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 1:00 PM said: I have tried ... 0 count($errorsReported) 0 != 0 !== isset($errorReported) !empty '' != '' !== Have you tried explicitly setting $errorsReported to to see where it goes? $errorsReported = ;

RE: [PHP] Storing data structires in DB

2005-03-24 Thread Chris W. Parker
GamblerZG mailto:[EMAIL PROTECTED] on Thursday, March 24, 2005 1:15 PM said: Output of serialize() is barely readable and definetely is not suited for manual editing. [snip /] Is there any good way to store/retrieve data structures (multidimetional arrays) to/from database? Maybe I

Re: [PHP] Pagination

2005-03-24 Thread pavel
I am wanting to paginate records from a MySQL Database. I want there to be 5 records on a page, on multiple pages. example for selecting page of records from mysql table: $sql=sprintf( SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT %d, %d, $position*$records, $records );

[PHP] Re: fopen problems

2005-03-24 Thread Jason Barnett
AJ Lemke wrote: Hello all, I have an install of php on a Red Hat Ent. server that is giving me fits. I have been trying to use the fopen command to retreive files from external sites and have been getting this error: Warning: fopen(http://us3.php.net/images/php.gif): failed to open stream:

Re: [PHP] Storing data structires in DB

2005-03-24 Thread John Nichel
GamblerZG wrote: Output of serialize() is barely readable and definetely is not suited for manual editing. It is quite simple to create var_export() clone that does not add junk to it's output. But then I would need to exec() the string to get a data structure back, which is bad security

Re: [PHP] How can I destroy parameters by page

2005-03-24 Thread pavel
IHow Can I destroy some variable that I pass by url, exmple: http://webadmin/paginas/personalidades.php?ac2=deleteitem=18# then when i get the varibale ac2 and item, I want to delete the value of this variable. unset($_GET['item']) ? http://www.php.net/manual/en/function.unset.php -- Pavel

[PHP] Getting the process ID

2005-03-24 Thread Joshua Beall
Hi All, I am doing some work where I want to do locking, and prevent scripts from running in parallel. I see that I could use the semaphore mechanism, but I'd like for my code to be portable, and that extension is not enabled in many places. I need some way for a process to uniquely identify

[PHP] Re: Storing data structires in DB

2005-03-24 Thread Joshua Beall
GamblerZG [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Output of serialize() is barely readable and definetely is not suited for manual editing. It is quite simple to create var_export() clone that does not add junk to it's output. But then I would need to exec() the string to

Re: [PHP] Getting the process ID

2005-03-24 Thread Rasmus Lerdorf
Joshua Beall wrote: I am doing some work where I want to do locking, and prevent scripts from running in parallel. I see that I could use the semaphore mechanism, but I'd like for my code to be portable, and that extension is not enabled in many places. Sort of defeats the whole concept of a

[PHP] Re: Getting the process ID

2005-03-24 Thread Joshua Beall
Rasmus Lerdorf [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Joshua Beall wrote: I am doing some work where I want to do locking, and prevent scripts from running in parallel. I see that I could use the semaphore mechanism, but I'd like for my code to be portable, and that

Re: [PHP] Problem with header in an if

2005-03-24 Thread Jochem Maas
Jay Blanchard wrote: /* send the errors to the interface and exit*/ if('' !== $errorsReported){ for($i = 0; $i count($errorsReported); $i++){ echo $errorsReported[$i]; } } else { /* reload the empty interface

Re: [PHP] image problem

2005-03-24 Thread Tom Rogers
Hi, Friday, March 25, 2005, 3:27:41 AM, you wrote: WS Hello, WS I really can't figure this out. Can someone help please. I've wasted hours WS already with this one. WS I'm trying to print image to a web page using fpassthru. Here's the code: WS $name = path/to/the/image/folder/img1.jpeg; WS

  1   2   >