Re: [PHP] sorting arrays

2005-03-08 Thread Jochem Maas
Gabino Travassos wrote: Hello List I've looked at array_multisort( ), but it doesn't seem like the right function. Here's an example of my array, it's a listing of CD reviews: $cds=array(array("Lowest of the Low", 20050105,9,"Toronto"), array("Heavy Blinkers",20041020,6,"Chicago"), array("Apple,

Re: [PHP] Newbie LEFT JOIN question

2005-03-08 Thread Rory McKinley
Jackson Linux wrote: Hi, all, I have three tables; 'cv', the main table, 'jobcat', a definition table and 'cvjobcats', an intersection table (for more detail see PS below). I'd like to join this all together to be able to make a headline consisting of the plain English description of the job ca

[PHP] PHP5.0.3 and pam authentication

2005-03-08 Thread Chris Dion
I'm trying to use pam_auth for a script. It loads into php but it's not authenticating the users. I'm using the correct password and username. This is a example of how I'm using the function: pam_auth($_POST[uname], $_POST[passwd], &$error) Any ideas? Thanks in advance -- PHP General Mailin

Re: [PHP] php-help

2005-03-08 Thread Lars B. Jensen
The following should be pretty selfexplanatory * 0 * * * /usr/local/bin/php /usr/local/www/cron/sync.php -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "

Re: [PHP] Newbie LEFT JOIN question

2005-03-08 Thread Robert Cummings
This is the P H P list not the S Q L list. I mean really, your question isn't even worded as a PHP question. Maybe if you add a few echos or a variable here and there someone here might let it pass. But just asking a plain old SQL question is not the purpose of the P H P list. Cheers, Rob. On We

[PHP] php-help

2005-03-08 Thread K Karthik
hello sir, i am so happy about the immiediate response for any of my question. i would like to create a static html page. using cronjob regenerate it every 24 hours. how can i do it using php. thanks, kkarthik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

[PHP] Newbie LEFT JOIN question

2005-03-08 Thread Jackson Linux
Hi, all, I have three tables; 'cv', the main table, 'jobcat', a definition table and 'cvjobcats', an intersection table (for more detail see PS below). I'd like to join this all together to be able to make a headline consisting of the plain English description of the job category followed by a

Re: [PHP] software catalog

2005-03-08 Thread James Williams
What's up Ryan, I do believe that the cart software you choose should for the most part be independent upon what exactly your selling. There are a few big shopping cart solutions that work for selling anything and I'm sure there are features and / or plugins that will allow you to do discounts

[PHP] software catalog

2005-03-08 Thread Ryan A
Hey! Anybody know of a "software catalog" (or cart preferably) that is free? A site i am working for sells software, now they want to have a cart feature so people can put the packages in a cart and get discounts etc if they purchase more than 1 product...they are using 2checkout for processing.

Re: [PHP] sorting arrays

2005-03-08 Thread Robert Cummings
On Tue, 2005-03-08 at 22:56, Gabino Travassos wrote: > Hello List > > I've looked at array_multisort( ), but it doesn't seem like the right > function. Here's an example of my array, it's a listing of CD reviews: > $cds=array(array("Lowest of the Low", 20050105,9,"Toronto"), array("Heavy > Blink

[PHP] sorting arrays

2005-03-08 Thread Gabino Travassos
Hello List I've looked at array_multisort( ), but it doesn't seem like the right function. Here's an example of my array, it's a listing of CD reviews: $cds=array(array("Lowest of the Low", 20050105,9,"Toronto"), array("Heavy Blinkers",20041020,6,"Chicago"), array("Apple,Fiona",20050308,5,"Seattl

Re: [PHP] PHP 5.0.3 and base64 encoded cookie value issue?

2005-03-08 Thread Pink Floyd
Richard, Thanks for clearing that up. I figured the value was transformed by the parser, but I did not know that it could be urlencode. I will test it tomorrow and confirm that it is so, I tried to look in the manual but did not find it anywhere. Thanks a lot. MK --- Richard Lynch <[EMAIL PROTEC

Re: [PHP] warning & question about mysql sessions & concurrency

2005-03-08 Thread Josh Whiting
On Tue, Mar 08, 2005 at 10:38:28AM -0800, Richard Lynch wrote: > Josh Whiting wrote: > > SO, does anyone have some code that uses MySQL to replace PHP's native > > session storage that also correctly handles this concurrency problem? > > Create your MySQL session tables using ENGINE=innoDB (in old

RE: [PHP] PHP / JavaScript integration

2005-03-08 Thread Chris W. Parker
Mário Gamito on Tuesday, March 08, 2005 4:28 PM said: > I'm trying to integrate some JavaScript functions in PHP, but so far, > no good :( [snip] > Now... i want to call this JavaScript function from the regular PHP > files. In particular, before the HTML code. > L

[PHP] MySQL - PHP - limits...

2005-03-08 Thread Alex Ortiz
Hello. Is there a records limit when browsing (a sql SELECT) in PHP from a MySQL table? I´m browsing a table with PHP from MySQL, and something is wrong, if the table has more than 5047 records, the browse appears blank. Additionaly, if make the browse in a child window (target="_blank"), the

[PHP] Re: PHP / JavaScript integration

2005-03-08 Thread Jason Barnett
Mário Gamito wrote: > Hi, > > I'm trying to integrate some JavaScript functions in PHP, but so far, no > good :( > ... > > How can i do this ? > How to tell PHP, that def(word) is a JS function in js.php file ? > I've tried include ('js.php'), etc., but got no results :( > > Any help would be a

Re: [PHP] PHP / JavaScript integration

2005-03-08 Thread Gabe Guzman
On Wed, Mar 09, 2005 at 12:27:39AM +, M?rio Gamito wrote: > Hi, > > I'm trying to integrate some JavaScript functions in PHP, but so far, no > good :( > > I want to have a js.php file that has the JavaScript functions i want to > use. This file, albeit its extension, has no PHP code or even

Re: [PHP] usage of php &

2005-03-08 Thread Robert Cummings
On Tue, 2005-03-08 at 19:27, Marek Kilimajer wrote: > Robert Cummings wrote: > > On Tue, 2005-03-08 at 10:55, Jochem Maas wrote: > > > >>I sure I'm not the only one on this list that reads php-internals > >>after reading the thread entitled: > >> > >>"" > >> > >>I'm wondering if anyone here has _e

[PHP] PHP / JavaScript integration

2005-03-08 Thread Mário Gamito
Hi, I'm trying to integrate some JavaScript functions in PHP, but so far, no good :( I want to have a js.php file that has the JavaScript functions i want to use. This file, albeit its extension, has no PHP code or even tag. It's just like this: js.php --
function def(word) {

Re: [PHP] usage of php &

Robert Cummings wrote: On Tue, 2005-03-08 at 10:55, Jochem Maas wrote: I sure I'm not the only one on this list that reads php-internals after reading the thread entitled: "" I'm wondering if anyone here has _ever_ used the tags to enclose php code? e.g.:


Re: [PHP] sorting arrays

Right! That fixed it. I was doing it like this: $nar = asort($nar); which gave me a boolean result When I should have done it like this: asort($nar) ; reset($nar); I didn't understand the return of an asort was boolean and not the processed array itself. Thanks, -Brian - Original M

Re: [PHP] sorting arrays

have you looked at the various array sorting functions available? http://www.php.net/manual/en/ref.array.php Brian A. Anderson wrote: Say I create a "matches" array from a set of SQL queries With each query, an entry is added to my matches array. If the name already exists, its value gets increment

Re: [PHP] Re: sorting arrays

> RTFM > arsort() Ok, so I use asort(), and I don't get the result I wanted. Instead I get the script telling me my foreach loop is wrong on the second test round, as if it did something other than simply sort the array. It seems that I can't access the array now? $nar = array('lma-bg51' => 1,

Re: [PHP] sorting arrays

On Tue, 2005-03-08 at 18:24, Brian A. Anderson wrote: > Say I create a "matches" array from a set of SQL queries With each query, > an entry is added to my matches array. If the name already exists, its value > gets incremented. How can I sort the array based on the highest number of > hits? > > W

RE: [PHP] sorting arrays

> Say I create a "matches" array from a set of SQL queries with each query, > an entry is added to my matches array. If the name already exists, its > value > gets incremented. How can I sort the array based on the highest number of > hits? > > What is the sort method? Say this is the array: > >

Re: [PHP] sorting arrays

Hello Brian, Everytime you're looking for an specific function to do some job, look at the php functions list. In this case: http://ar2.php.net/manual/es/ref.array.php These are the most common ones i use: array_reverse usort uksort uasort and obviusly sort Hope this helps, Guillermo Rauch --

[PHP] Re: sorting arrays

Brian A. Anderson wrote: Say I create a "matches" array from a set of SQL queries With each query, an entry is added to my matches array. If the name already exists, its value gets incremented. How can I sort the array based on the highest number of hits? What is the sort method? Say this is the ar

Re: [PHP] Re: How can i calculate total process time?

Richard Lynch wrote: M. Sokolewicz wrote: JoShQuNe wrote: Hi, i wanna ask if anybody knows how to calculate the total process time. I guess there exists a function to perform but i dont know which one it is. I mean if u c any PHP Nuke site, it says this page is produced in seconds. I made some

[PHP] sorting arrays

Say I create a "matches" array from a set of SQL queries With each query, an entry is added to my matches array. If the name already exists, its value gets incremented. How can I sort the array based on the highest number of hits? What is the sort method? Say this is the array: array('lma-bg51' =

[PHP] sorting arrays

Say I place the results of a set of database queries -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP 5.0.3 and base64 encoded cookie value issue?

Pink Floyd wrote: > (I had posted this in the Zend php-general mailing > list > but it did not show up in php.net, so here it is > again) > Greetings, > I am not sure whether this is a bug or a 'feature' > (new to PHP). I have a cookie that is set by our > password server (NON-PHP) for our domain,

[PHP] PHP 5.0.3 and base64 encoded cookie value issue?

(I had posted this in the Zend php-general mailing list but it did not show up in php.net, so here it is again) Greetings, I am not sure whether this is a bug or a 'feature' (new to PHP). I have a cookie that is set by our password server (NON-PHP) for our domain, whose value is base64 encoded when

Re: [PHP] Re: A general question

Your right -- it is wrong. I cut and pasted that directly from a File Sharing app I wrote for our company intranet. I wrote that script a very long time ago (1999 or 2000). I think that, originally, the first one didn't work and I added the second. I forgot to remove it, maybe I though it was

Re: [PHP] using lists in php and sending

First off - do you have global variables turned on? If not then you need to collect the data from the $_POST variable. Also - when you use a multiple select form field the values come across in an array. So you would need to access the data using something like this: $i=0; while($rooms[$i]) {

Re: [PHP] using lists in php and sending

Ross Hulford wrote: > I have a list in php where the user can select 1 or more (rooms book in a > b&b). The following code is part of the form. > > http://php.net/manual/en/faq.html.php#faq.html.select-multiple You may want to switch to CHECKBOX since many users have NO CLUE about the whole cont

Re: [PHP] Newbie Question re substr

Jackson Linux wrote: > On 8 Mar 2005, at 11:40, Richard Lynch wrote: > 1. $content = substr($article['content'], 0 200); // get first 200 chars is choking, and I've looked in docs and can't understand why. I get Parse error: parse error, unexpected T_LNUMBER

Re: [PHP] swaping mysql table values

Dave Carrera wrote: > Hi List, > > I have a table like the diag below: > > ID Name Pos > 1 jig 1 > 2 pig 2 > 3 dig 3 > 4 fig 4 > > What i am trying to do is upon click to change pos 1 to pos 2 and pos 2 > to pos 1so that i can manage the position i show my list. > > Can someone throw me

[PHP] Re [PHP] Newbie Question re substr: Solved

Sorry if this posts twice. Thanks everyone for the help. The missing comma was the problem with the display; the missing specification of the column at the start of the sql query was the problem with getting the data from the column. Again, thanks all who replied for the fast and excellent hel

Re: [PHP] Re: How can i calculate total process time?

M. Sokolewicz wrote: > JoShQuNe wrote: >> Hi, i wanna ask if anybody knows how to calculate the total process >> time. I guess there exists a >> function to perform but i dont know which one it is. I mean if u c any >> PHP Nuke site, it says this >> page is produced in seconds. I made some cod

Re: [PHP] stream_set_timeout & get_headers (PHP5)

Chris wrote: > I'm requesting some remote files to cache on my own server and performing > a get_headers() first to find out the file type, since I don't always know > what it is. I've discovered some timeout problems with the remote server > sometimes and my own script would end up with a fatal e

[PHP] Re: using lists in php and sending

Ross Hulford wrote: > I have a list in php where the user can select 1 or more (rooms book in a > b&b). The following code is part of the form. > > > Single > Standard > Single > EnSuite > Double > EnSuite

Re: [PHP] Comments and performance

> Does this affect _execution performance_ of the scripts at all i.e. are > they precompiled/interpreted and cached without comments or interpreted > on every execution? The comments get stripped out on each execution of the whole script, unless you are using a caching system such as Zend Cache.

Re: [PHP] warning & question about mysql sessions & concurrency

Josh Whiting wrote: > SO, does anyone have some code that uses MySQL to replace PHP's native > session storage that also correctly handles this concurrency problem? Create your MySQL session tables using ENGINE=innoDB (in older MySQL, use TYPE=innoDB) http://mysql.com can tell you lots more about

Re: [PHP] Help with dates

Kevin wrote: > Right now I'm working on a script that would calculate dates from one > calendar to another. The normal calendar we use and a newly invented one. [shudder] There are already WAY too many calendar systems. Inventing a new one is probably not such a good plan... Why re-invent the wh

[PHP] Re: usage of php &

Jochem Maas wrote: I sure I'm not the only one on this list that reads php-internals after reading the thread entitled: "" I'm wondering if anyone here has _ever_ used the tags to enclose php code? e.g.: