Re: [PHP] CSV speed

2008-03-10 Thread Danny Brow
On Mon, 2008-03-10 at 22:36 -0400, Wolf wrote:
> Danny Brow wrote:
> > I have about 10 csv files I need to open to access data. It takes a lot
> > of time to search each file for the values I need. Would it be best to
> > just dump all the cvs files to an SQL db and then just grab what I need
> > from there? I'm starting to think it would make a lot of sense. What do
> > you guys think?
> > 
> > Thanks,
> > Dan
> 
> 
> Dan,
> 
> I can tell you that depending on the size of your files is going to 
> dictate the route you want to go.  I have a CSV with 568,000+ lines with 
> 19 different pieces to each line.  The files are around 180M apiece and 
> it takes my server about 2 seconds to run a system grep against the 
> files.  I can run a recursive call 7 times against a MySQL database with 
> the same information and it takes it about 4 seconds.
> 
> IF you have system call ability, a grep wouldn't be bad, otherwise I'd 
> suggest loading the csv files into MySQL tables and checking them for 
> the information, then dropping the tables when you get the next files. 
> You can backup the databases such as a cron job overnight even.
> 
> HTH,
> Wolf
> 
> 


Thanks that sounds like a good idea. I'm still plugging away with how I
started. I want to know how much faster it will be going with a db. I
was actually thinking of using diff for each updated file to and upload
that to the DB.

Dan




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CSV speed

2008-03-10 Thread Danny Brow
I have about 10 csv files I need to open to access data. It takes a lot
of time to search each file for the values I need. Would it be best to
just dump all the cvs files to an SQL db and then just grab what I need
from there? I'm starting to think it would make a lot of sense. What do
you guys think?

Thanks,
Dan


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GPS Locator

2008-03-04 Thread Danny Brow
Wintec makes a nice unit. http://www.wintec.com.tw/en/home.php

But you are screwed if the system is in doors. I doubt you would get a
GPS signal inside a building.

Dan


On Tue, 2008-03-04 at 10:18 -0600, Jay Blanchard wrote:
> Howdy group!
> 
> I know that this is not a PHP question (but it will work with a PHP app)
> but I thought I would ask the smartest group of people I know if they
> have any clue or would be familiar with a device I can use. I need to
> purchase a small GPS receiver/antenna that will plug into a USB port.
> Then I need to access the port (Ajax? Java?) while in my web application
> to deliver the coordinates to my PHP application. That will give me the
> physical location of the machine accessing the application.
> 
> Any insight will be valuable.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] DESC order results

2008-01-13 Thread Danny Brow

Thanks for the answer, didn't think of asking this in a MySQL forum,
sorry.

Dan

On Sun, 2008-01-13 at 20:28 +0100, Jochem Maas wrote:
> Danny Brow schreef:
> > Just wondering if anyone could tell me how reliable the DESC order
> > option is going to be when I am parsing thousands of records where they
> > are multiple ChartNo's for the same clientNo. Or is there a better way
> > to grab the most recent ChartNo.
> 
> this is a mysql question not a php question, please try to ask questions
> in the appropriate forum.
> 
> the reliability of 'ORDER BY' is not tied to the ammount of
> records returned.
> 
> given that you only want the 'most recent'
> (by which I assume you mean the 'highest value') ChartNo for
> a given clientNo you should be performing a query that returns a
> single row of data.
> 
> also you shouldn't be quoting values pertaining to numeric fields
> (I assume clientNo is an integer)
> 
> 1. assuming ChartNo is numeric:
> 
> SELECT MAX(ChartNo) as chartno FROM eChart WHERE clientNo=2
> 
> 2. assuming ChartNo is a varchar (or similar):
> 
> SELECT ChartNo FROM eChart WHERE clientNo=2 ORDER BY ChartNo DESC LIMIT 0,1
> 
> > 
> > $link = mysql_connect('localhost', 'myuser', 'mypassword') or die('Could
> > not connect: ' . mysql());
> > 
> > mysql_select_db('mydatabase') or die('Could not select database');
> > 
> > $query = 'SELECT * FROM eChart WHERE clientNo = "2" ORDER BY ChartNo
> > DESC';
> > 
> > $result = mysql_query($query) or die('Query failed: ' . mysql_error());
> > 
> > $line = mysql_fetch_array($result, MYSQL_ASSOC);
> > 
> > 
> > // Just for testing
> > print mysql_num_rows($result);
> > 
> > 
> > 
> > Thanks,
> > Dan
> > 
> > 
> > 
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] DESC order results

2008-01-13 Thread Danny Brow
Just wondering if anyone could tell me how reliable the DESC order
option is going to be when I am parsing thousands of records where they
are multiple ChartNo's for the same clientNo. Or is there a better way
to grab the most recent ChartNo.

$link = mysql_connect('localhost', 'myuser', 'mypassword') or die('Could
not connect: ' . mysql());

mysql_select_db('mydatabase') or die('Could not select database');

$query = 'SELECT * FROM eChart WHERE clientNo = "2" ORDER BY ChartNo
DESC';

$result = mysql_query($query) or die('Query failed: ' . mysql_error());

$line = mysql_fetch_array($result, MYSQL_ASSOC);


// Just for testing
print mysql_num_rows($result);



Thanks,
Dan




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fgetcsv

2008-01-09 Thread Danny Brow
You are so right, takes all of 0.122 s to process the whole file with
the fgetcsv inside the while loop Guess I need to look up why this
was the problem.

Thanks everyone!


On Wed, 2008-01-09 at 20:59 -0600, Richard Lynch wrote:
> 6500 rows is chump-change.
> 
> You probably don't have the fgetcsv inside the while loop to get past
> the first row... :-)
> 
> On Wed, January 9, 2008 6:09 pm, Danny Brow wrote:
> > I need to compare the first field of each row. But this idea is shot
> > to
> > hell, i've been running one of the examples on the file and it's been
> > about an hour+ already... 6500 records have to be checked... I think
> > MySQL is calling my name right now.
> >
> > Thanks,
> > Dan
> >
> >
> > On Thu, 2008-01-10 at 09:59 +1100, Chris wrote:
> >> Danny Brow wrote:
> >> > Hi Everyone,
> >> >
> >> > I'm trying to compare a value to the first field in a csv fILE
> >> (example
> >> > of the data below). Using while takes too long and I can't figure
> >> out
> >> > how to compare just one row at a time. I've tried some variations
> >> of the
> >> > following.
> >>
> >> So are you trying to compare the first column or the first row?
> >> You've
> >> said you want to compare both.
> >>
> >> To compare the first row:
> >>
> >>  >>
> >> $handle = fopen('file.csv', 'r') or die("unable to open file");
> >>
> >> $my_row = array('1','2','John Smith');
> >>
> >> $data = fgetcsv($handle, 1000, ",");
> >>
> >> if ($data === false) {
> >>echo "Unable to get anything from the file.";
> >> }
> >>
> >> if (is_array($data)) {
> >>if ($data == $my_row) {
> >>echo "The first row matched\n";
> >>} else {
> >>echo "The first row didnt match\n";
> >>}
> >> }
> >>
> >> fclose($handle);
> >>
> >>
> >> If you really do want to compare the first column, then the time to
> >> do
> >> it will be based on how big the csv file is. If you have a big file,
> >> it's going to take a long time to go through each row and then look
> >> at
> >> the first field.
> >>
> >>  >>
> >> $handle = fopen('file.csv', 'r') or die("unable to open file");
> >>
> >> $my_value = '1';
> >>
> >> $row_count = 0;
> >> while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
> >>$row_count++;
> >>if ($data[0] == $my_value) {
> >>echo "Found my_value on row ", $row_count, "\n";
> >>} else {
> >>echo "Did not find my_value on row ", $row_count, "\n";
> >>}
> >> }
> >>
> >> fclose($handle);
> >>
> >> --
> >> Postgresql & php tutorials
> >> http://www.designmagick.com/
> >>
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> -- 
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/from/lynch
> Yeah, I get a buck. So?
> 
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] fgetcsv

2008-01-09 Thread Danny Brow
Um, I've read the manual.


On Wed, 2008-01-09 at 20:11 -0500, Bastien Koert wrote:
> http://ca.php.net/manual/en/function.fgetcsv.php
> _
> Discover new ways to stay in touch with Windows Live! Visit the City @ Live 
> today!
> http://getyourliveid.ca/?icid=LIVEIDENCA006
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fgetcsv

2008-01-09 Thread Danny Brow
I need to compare the first field of each row. But this idea is shot to
hell, i've been running one of the examples on the file and it's been
about an hour+ already... 6500 records have to be checked... I think
MySQL is calling my name right now.

Thanks,
Dan


On Thu, 2008-01-10 at 09:59 +1100, Chris wrote:
> Danny Brow wrote:
> > Hi Everyone,
> > 
> > I'm trying to compare a value to the first field in a csv fILE (example
> > of the data below). Using while takes too long and I can't figure out
> > how to compare just one row at a time. I've tried some variations of the
> > following.
> 
> So are you trying to compare the first column or the first row? You've 
> said you want to compare both.
> 
> To compare the first row:
> 
>  
> $handle = fopen('file.csv', 'r') or die("unable to open file");
> 
> $my_row = array('1','2','John Smith');
> 
> $data = fgetcsv($handle, 1000, ",");
> 
> if ($data === false) {
>   echo "Unable to get anything from the file.";
> }
> 
> if (is_array($data)) {
>   if ($data == $my_row) {
>   echo "The first row matched\n";
>   } else {
>   echo "The first row didnt match\n";
>   }
> }
> 
> fclose($handle);
> 
> 
> If you really do want to compare the first column, then the time to do 
> it will be based on how big the csv file is. If you have a big file, 
> it's going to take a long time to go through each row and then look at 
> the first field.
> 
>  
> $handle = fopen('file.csv', 'r') or die("unable to open file");
> 
> $my_value = '1';
> 
> $row_count = 0;
> while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
>   $row_count++;
>   if ($data[0] == $my_value) {
>   echo "Found my_value on row ", $row_count, "\n";
>   } else {
>   echo "Did not find my_value on row ", $row_count, "\n";
>   }
> }
> 
> fclose($handle);
> 
> -- 
> Postgresql & php tutorials
> http://www.designmagick.com/
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] fgetcsv

2008-01-09 Thread Danny Brow
Hi Everyone,

I'm trying to compare a value to the first field in a csv fILE (example
of the data below). Using while takes too long and I can't figure out
how to compare just one row at a time. I've tried some variations of the
following.


//Common for all trials
$demoID = fopen("newDemoID.csv", "r");;
$ID = "43";

$data = fgetcsv($demoID);



First try with while:

/*
while ($data) {
if ($data[0] == $wolfID) {
print $data[1] . "," . $data[2] . "," . $data[3] .
".\n";
}
}
*/


Takes for every.

I can't use just the below because it only compares the first row.

/*
if ($data[0] == $wolfID) {
   print $data[1] . "," . $data[2] . "," . $data[3] . ".\n";
}

*/


I know this is simple, but I've hit codes block due to lack of sleep. 

Thanks,
Dan



Sample Data:

> 5,1,"Smith","Myrtle"
> 6,2,"Smith","Carita"
> 7,3,"Smith","Paul"
> 8,4,"Smith","Donald"





-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CSV date issue - Solved

2007-01-11 Thread Danny Brow
Seems my problem was a data issue and I needed to compensate for missing
dates.

thanks,
Dan

On Thu, January 11, 2007 2:31 pm, Danny Brow wrote:
> Hi,
>
>
> It's been a while since I've used php and I'm trying to organize some
> data by date. The problem I'm having is that when the data changes from
> say 2006 to 2005 the first few rows of 2005 data goes into my 2006 data
> and the date for 2006 is lost. My code for separating dates is below with
> some sample data. I'm sure I'm missing something simple here. The date
> within the 3rd column can be ignored.
>
> TIA
>
>
>
> $num = count($data);
> for ($c=0; $c < $num; $c++) { if ($c == 5) { $data[5] =
> strftime("%m/%d/%G",strtotime('-1 Day', strtotime($data[5]))); //Fix date,
> data is off by 1 day. }
> $date = strftime("%G",strtotime($data[5]));
> if ($date == "") { //Skip row if date field is empty. // Skip
> } else {
> if ($date == 2006) { $data2006 .= "\"" . $data[$c] ."\",";
> }  elseif ($date == 2005) {
> $data2005 .= "\"" . $data[$c] ."\",";
> }  elseif ($date == 2004) {
> $data2004 .= "\"" . $data[$c] ."\",";
> }  elseif ($date == 2003) {
> $data2003 .= "\"" . $data[$c] ."\",";
> }  elseif ($date == 2002) {
> $data2002 .= "\"" . $data[$c] ."\",";
> }  elseif ($date == 2001) {
> $data2001 .= "\"" . $data[$c] ."\",";
> }  elseif ($date < 2000) {
> $data1999pre .= "\"" . $data[$c] ."\",";
> }
> }
> }
>
>
>
> Sample data
> "60609C49.PCX","PG 1","BLUEWATER HEALTH, LAB, 04/06/06","10003533S","BUNNY
>  BUGS","06/10/2006"
> "60609C50.PCX","PG 1","Cake walk, other, 04/06/06","10003533T","Tweedy
> Bird","06/11/2006"
> "50609C49.PCX","PG 1","HEALTH, LAB, 04/06/06","10003533g","Smurf
> Grumpy","06/10/2005"
> "50699C55.PCX","PG 1","Lab 101, 04/06/06","10003533p","Smurf
> Pappy","04/10/2005"
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CSV date issue

2007-01-11 Thread Danny Brow
Hi,

It's been a while since I've used php and I'm trying to organize some data
by date. The problem I'm having is that when the data changes from say
2006 to 2005 the first few rows of 2005 data goes into my 2006 data and
the date for 2006 is lost. My code for separating dates is below with some
sample data. I'm sure I'm missing something simple here. The date within
the 3rd column can be ignored.

TIA


 $num = count($data);
   for ($c=0; $c < $num; $c++) {
  if ($c == 5) {
 $data[5] = strftime("%m/%d/%G",strtotime('-1 Day',
strtotime($data[5]))); //Fix date, data is off by 1 day.
  }
  $date = strftime("%G",strtotime($data[5]));
 if ($date == "") { //Skip row if date field is empty.
// Skip
 } else {
if ($date == 2006) {
   $data2006 .= "\"" . $data[$c] ."\",";
}  elseif ($date == 2005) {
   $data2005 .= "\"" . $data[$c] ."\",";
}  elseif ($date == 2004) {
   $data2004 .= "\"" . $data[$c] ."\",";
}  elseif ($date == 2003) {
   $data2003 .= "\"" . $data[$c] ."\",";
}  elseif ($date == 2002) {
   $data2002 .= "\"" . $data[$c] ."\",";
}  elseif ($date == 2001) {
   $data2001 .= "\"" . $data[$c] ."\",";
}  elseif ($date < 2000) {
   $data1999pre .= "\"" . $data[$c] ."\",";
}
  }
   }


Sample data
"60609C49.PCX","PG 1","BLUEWATER HEALTH, LAB, 04/06/06","10003533S","BUNNY
BUGS","06/10/2006"
"60609C50.PCX","PG 1","Cake walk, other, 04/06/06","10003533T","Tweedy
Bird","06/11/2006"
"50609C49.PCX","PG 1","HEALTH, LAB, 04/06/06","10003533g","Smurf
Grumpy","06/10/2005"
"50699C55.PCX","PG 1","Lab 101, 04/06/06","10003533p","Smurf
Pappy","04/10/2005"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] test

2005-06-08 Thread Danny Brow
On Tue, 2005-06-07 at 14:46 +0200, Hans J.J. Prins wrote:
> test
> 
Failed.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] linux php editor

2005-06-06 Thread Danny Brow
On Mon, 2005-06-06 at 18:09 -0800, Clive Zagno wrote:
> the truth is Ive been developing on windows, because of some .net 
> developments.
> 
> Ive been starting most new projects as web applications and using 
> php/mysql. On windows I used ultredit, then I found a product called 
> phpedit, which I liked, now Im trying to move to linux.
> 
> what I really want is a app that can do that predictive text thing, you 
> know when it start showing me the possible php syntax as Im typing it 
> in. Two reasons for this is it help with debugging as I get the syntax 
> correct the first time and secondly I think its cool.
> 

Komodo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] dynamic drop down

2005-06-04 Thread Danny Brow
On Wed, 2005-06-01 at 11:49 +0100, Mark Rees wrote:
> The dropdown list is on the client (browser). Javascript runs on the
> client. PHP runs on the server. 
> 
> You have 2 options 
> 
> - one is to do as Richard says and use javascript to change the contents
> of one select box when an option is selected in another. 
> - the other is to refresh the page when the option is selected and write
> different data into the second select box based on the option selected.
> This is a question of using echo and iterating through the data you wish
> to output.
> 
> 


So how do you refresh the page when the drop down is selected? 

Thanks,
Dan.

> -----Original Message-
> From: Danny Brow [mailto:[EMAIL PROTECTED] 
> Sent: 01 June 2005 07:08
> To: PHP-Users
> Subject: Re: [PHP] dynamic drop down
> 
> 
> On Tue, 2005-05-31 at 22:08 -0700, Richard Lynch wrote:
> > On Tue, May 31, 2005 8:48 pm, Danny Brow said:
> > > Could someone point me to an example with code for dynamic drop 
> > > downs in PHP? I would like to be able to have drop downs like 
> > > "Select Country" and another drop down show the states/provinces 
> > > based on the selected country.
> > 
> > Well, the "dynamic" part of it isn't gonna be in PHP at all ; It's 
> > gonna be JavaScript.
> 
> I thought I'd have to use JS, but was hoping someone knew a way to do it
> with PHP.
> 
> 
> > You can Google for "JavaScript dynamic menus" to find what you want.  
> > Then you just need to use PHP to spew out the JavaScript you want to 
> > spew out, but that's no different than spewing out the HTML you want 
> > to spew out, really.
> 
> Tons on google, thanks,
> 
> Dan.
> 
> Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
> Cisco, Sun Microsystems, 3Com
> 
> GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND REGISTERED FOR 
> ISO 9001:2000 CERTIFICATION
> 
> **
> 
> CONFIDENTIALITY NOTICE:
> 
> This Email is confidential and may also be privileged. If you are not the
> intended recipient, please notify the sender IMMEDIATELY; you should not
> copy the email or use it for any purpose or disclose its contents to any
> other person.
> 
> GENERAL STATEMENT:
> 
> Any statements made, or intentions expressed in this communication may not
> necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
> content
> herein may be held binding upon Gamma Global (UK) Ltd or any associated 
> company
> unless confirmed by the issuance of a formal contractual document or
> Purchase Order,  subject to our Terms and Conditions available from 
> http://www.gammaglobal.com
> 
> E&OE
> 
> **
> **
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mailing list delays

2005-06-02 Thread Danny Brow
On Thu, 2005-06-02 at 17:15 -0700, Rasmus Lerdorf wrote:
> We found a problem caused by a recent disk failure that wiped out a
> named pipe qmail needed.  I am hoping the mailing list delays should be
> fixed now.
> 
> -Rasmus
> 
test


signature.asc
Description: This is a digitally signed message part


Re: [PHP] Delay?

2005-06-02 Thread Danny Brow
On Thu, 2005-06-02 at 15:32 -0400, GamblerZG wrote:
> Sebastian wrote:
> > yea.. takes hours... sometimes 6+ or more.
> > i dont post that much to the list for this reason.. if it stays like 
> > this i'll just unsubscribe.. its pointless... this is suppose to be 
> > E-mail, not post office mail.
> 
> I don't understand why everyone like these mailing lists so much. 
> Web-forums more convenient.
> 

Convenient for your maybe, I personally hate web forums. 



signature.asc
Description: This is a digitally signed message part


Re: [PHP] dynamic drop down

2005-06-01 Thread Danny Brow
On Tue, 2005-05-31 at 22:08 -0700, Richard Lynch wrote:
> On Tue, May 31, 2005 8:48 pm, Danny Brow said:
> > Could someone point me to an example with code for dynamic drop downs in
> > PHP? I would like to be able to have drop downs like "Select Country"
> > and another drop down show the states/provinces based on the selected
> > country.
> 
> Well, the "dynamic" part of it isn't gonna be in PHP at all ; It's gonna
> be JavaScript.

I thought I'd have to use JS, but was hoping someone knew a way to do it
with PHP.


> You can Google for "JavaScript dynamic menus" to find what you want.  Then
> you just need to use PHP to spew out the JavaScript you want to spew out,
> but that's no different than spewing out the HTML you want to spew out,
> really.

Tons on google, thanks,

Dan.



signature.asc
Description: This is a digitally signed message part


[PHP] dynamic drop down

2005-05-31 Thread Danny Brow
Could someone point me to an example with code for dynamic drop downs in
PHP? I would like to be able to have drop downs like "Select Country"
and another drop down show the states/provinces based on the selected
country.

Thanks,
Dan.


signature.asc
Description: This is a digitally signed message part


[PHP] test

2005-05-31 Thread Danny Brow
If this gets to the list it's just a test. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] test

2005-05-31 Thread Danny Brow



signature.asc
Description: This is a digitally signed message part


Re: [PHP] PHP Applications?

2005-05-17 Thread Danny Brow
On Tue, 2005-05-17 at 15:34 -0400, Brent Baisley wrote:
> Zend sells a compiler to speed up your PHP code. Since it's compiled, 
> it also does not contain the source code in readable form. You should 
> visit the Zend website.
> 

Any free ones?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Starting a big project

2005-05-01 Thread Danny Brow
On Sun, 2005-05-01 at 18:53 +0200, Gabriel Birke wrote:
> You could avoid the decision if you use the O/R mapper propel:
> http://propel.phpdb.org/wiki/


I'm using Pear DB (via PG). And then I'm going to port to postgresql.
I've got most of the tools I'm going to use for the project worked out.
Just figuring out what is better, DB layout -> Write App, or Write app &
DB at the same time. Mike sent a real good answer, exactly what I was
looking for.

Thanks for you reply, I'm going to read up on propel even though I will
probably not use it for this project.

Thanks,
Dan

> 
> On 5/1/05, Danny Brow <[EMAIL PROTECTED]> wrote:
> > I'm about to start writing a big web app (mostly in PHP). But I'm not
> > sure if I should layout the DB first then write the app, or should I
> > just start writing the app and add stuff to the DB as I need it. How do
> > you guys go about it?
> > 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Starting a big project

2005-05-01 Thread Danny Brow
I'm about to start writing a big web app (mostly in PHP). But I'm not
sure if I should layout the DB first then write the app, or should I
just start writing the app and add stuff to the DB as I need it. How do
you guys go about it?

Thanks,
Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best Server OS

2005-03-28 Thread Danny Brow
On Mon, 2005-03-28 at 23:28 +0200, M. Sokolewicz wrote:
> Danny Brow wrote:
> 
> > On Mon, 2005-03-28 at 15:58 -0500, Mike wrote:
> > 
> >>I personally like OpenBSD - though many of the BSDs are similar at many
> >>tasks and only have notable differences in a few areas (and it's those areas
> >>you should look to find which works best for you).
> >>
> >>I wonder who will get bored and stir up the ants nest and say Windows? ;)
> > 
> > 
> > Screw Windows, how about OS/2 :)
> screw that too. Unix-based systems are the way to go here. From what 
> I've seen, those are the systems that are:
> a) most used
> b) run smoothest
> c) are simplest to install / manage from a distance
> d) are most up-to-date at all times
> 
> Personally I'd suggest using either Fedora (RH), or Debian.  But that's 
> just my personal opinion ;)
> 

I was kidding about OS/2, it's a dead OS. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Best Server OS

2005-03-28 Thread Danny Brow
On Mon, 2005-03-28 at 15:58 -0500, Mike wrote:
> I personally like OpenBSD - though many of the BSDs are similar at many
> tasks and only have notable differences in a few areas (and it's those areas
> you should look to find which works best for you).
> 
> I wonder who will get bored and stir up the ants nest and say Windows? ;)

Screw Windows, how about OS/2 :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best Server OS

2005-03-28 Thread Danny Brow
On Mon, 2005-03-28 at 15:19 -0500, Phil Neeb wrote:
> I'm lookin for some opinions on this one ...
> 
> What do you think the best OS is for running a server with PHP and 
> MySQL?  If you're going to say Linux, please, which Linux OS, there are 
> so many.


Slackware.

Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Postgresql & PHP

2005-03-22 Thread Danny Brow
Any recommendations on books for postgresql & PHP usage.

Thanks,
Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Update db with $_POST

2005-03-16 Thread Danny Brow
On Wed, 2005-03-16 at 16:50 +1000, Ligaya Turmelle wrote:
> assuming you are using PEAR DB -
> 
> $result =& $db->query("UPDATE items SET (item_name, item_desc, 
> item_price, extraprice) VALUES (?,?,?,?) WHERE item_id = 3", 
> array($_POST['title'], $_POST['description'], $_POST['price'],
>   $_POST['extraprice']));
> if (PEAR::isError($result))
> { 
>   echo "Error: There was an error with the query.  Message returned: ";
>   die($result->getMessage().'  '.$db->getUserInfo().' '));
> }


Thanks I got it worked out though, I'm going to try this also to see
what happens, I'm trying to learn the best I can and when things break
and you fix em you learn a lot more.  Thanks again.

PS this is what I did:

$db->query('UPDATE items SET item_name=?, item_desc=?, item_price=?,
extraprice=? WHERE item_id = 3',
array($_POST['title'], $_POST['description'],
$_POST['price'], $_POST['extraprice']));

I've already posted this to the list, but it may not be there yet.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Update db with $_POST

2005-03-15 Thread Danny Brow
On Tue, 2005-03-15 at 18:45 -0500, Jason Barnett wrote:
> Danny Brow wrote:
> > Thanks for looking,
> >
> > I figured it out, after RTFM for db, I found that I needed to do field=? 
> > instead of using VALUES ().
> >
> >
> >
> > Example:
> >
> > $db->query('UPDATE items SET item_name=?, item_desc=?, item_price=?, 
> > extraprice=? WHERE item_id = 3',
> > array($_POST['title'], $_POST['description'], $_POST['price'], 
> > $_POST['extraprice']));
> >
> 
> FYI - You should at least escape the $_POST data (more filtering may be
> necessary) before you go inserting it into your database.  When using
> raw $_POST data it may be possible for someone to DROP DATABASE.

I was planning on this, but I like to get things working first then move
on to cleaning the input up. I'm still learning the db stuff, so the
less that can cause an issue the better.

Thanks,
Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Update db with $_POST

2005-03-15 Thread Danny Brow
I'm trying to update some form data with this db update query and it's
not working, I'm not getting an error either.

$db->query("UPDATE items SET item_name = $_POST[title], item_desc =
$_POST[description], item_price = $_POST[price], extraprice =
$_POST[extraprice] WHERE item_id = 3");

& 

I've tried this:

$db->query("UPDATE items SET (item_name, item_desc, item_price,
extraprice)
   VALUES (?,?,?,?) WHERE item_id = 3",
   array($_POST['title'], $_POST['description'], $_POST['price'],
$_POST['extraprice']));


Thanks,
Dan.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE: Update db with $_POST

2005-03-15 Thread Danny Brow
Thanks for looking,

I figured it out, after RTFM for db, I found that I needed to do field=? 
instead of using VALUES ().



Example:

$db->query('UPDATE items SET item_name=?, item_desc=?, item_price=?, 
extraprice=? WHERE item_id = 3',
array($_POST['title'], $_POST['description'], $_POST['price'], 
$_POST['extraprice']));






>I'm trying to update some form data with this db update query and it's
>not working, I'm not getting an error either.

>$db->query("UPDATE items SET item_name = $_POST[title], item_desc =
>$_POST[description], item_price = $_POST[price], extraprice =
>$_POST[extraprice] WHERE item_id = 3");

>& 

>I've tried this:

>$db->query("UPDATE items SET (item_name, item_desc, item_price,
>extraprice)
>   VALUES (?,?,?,?) WHERE item_id = 3",
>   array($_POST['title'], $_POST['description'], $_POST['price'],
>$_POST['extraprice']));

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] List gone quiet?

2005-02-25 Thread Danny Brow
On Fri, 2005-02-25 at 11:13 +, Lester Caine wrote:
> Nothing on list over night?


It's a PHP fast :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] For HomeSite users...

2005-01-20 Thread Danny Brow

.org don't work but www.phpeclipse.de does.

Dan.

On Fri, 2005-01-21 at 12:06 +1100, [EMAIL PROTECTED] wrote:
> I havent used Homesite in years, I am now an Eclipse advocate :)
> 
> www.phpeclipse.org :)
> 
> 
> > OMG!
> >
> > This is quite possibly the coolest thing I've found in a while, and it
> > breathes new life into my aging HomeSite+ v5.2 (now that Macromedia
> > isn't really updating it and is focusing more on their DreamWeaver
> > line).
> >
> > http://www.wilk4.com/asp4hs/installation.htm#parser
> >
> > http://www.wilk4.com/asp4hs/dnld/php5_parser_js.zip
> >
> > http://www.wilk4.com/asp4hs/list2.htm
> >
> > Just look around all those links and you will find an abundance of
> > useful toolbars, PHP5 color coders, snippets, context manuals, etc. I
> > nearly spooged on myself when I came across this today. (no pun
> > intended)
> >
> > "Jeremy Swinborne" <[EMAIL PROTECTED]> created a PHP5 color coding
> > .scc file that is just a life saver. It fixes many of the short comings
> > of the default PHP4 color coder. It handles stuff like:
> >
> > echo "\"this is embeded $variable in my output\""; and it knows about
> > classes!
> >
> >
> > daevid.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php editor

2005-01-13 Thread Danny Brow
On Thu, 2005-01-13 at 18:02 +0200, William Stokes wrote:
> Hello,
> 
> I'm quite new with writing php code. I was considering of using some kind of
> php editor program to help with the syntax. Know any goog ones?
> 
> Thanks
> -Will
> 

I like Komodo.

Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] can I compile php source OT

2004-12-21 Thread Danny Brow
Wow I just wasted 10 minutes of my day reading half these post.  This is
one long thread. And man is it hard to follow.

Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ISP snippet

2004-12-10 Thread Danny Brow
On Thu, 2004-12-09 at 18:17 -0600, Brad Ciszewski wrote:
> i need help to figure out the isp of a user. can anyone help me with this?

http://www.arin.net/whois/

It will give you the owner of the IP address, i.e. Bell, AOL, etc.

Whats the reason you need the uses ISP?

> 
> 
> 
> -Brad
> 
> www.BradTechnologies.com
> 99.9% Uptime
> 24/7 Support
> Packages as low as 3.50 p/month!
> www.BradTechnologies.com
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Fri, 2004-12-10 at 05:52 +0800, Jason Wong wrote:
> On Friday 10 December 2004 04:52, Danny Brow wrote:
> 
> OK, you never said what your problem was except to say "everything works but 
> the str_replace item_pics1."
> 
> Did you check $GLOBALS['errors'] after calling this function?
No but I'm doing that now. I'm also reading the manual on $GLOBALS right
again, this must have been something I missed the first time reading it.

> 
> > function html_template() {
> > global $item_pics1;
> > if (file_exists('item.html')) {
> 
> Is this file supposed to be same as the one below?
> 
> > $item_file_name = $GLOBALS['root_dir'] . "/" . $GLOBALS['dir'] .
> > "/item.html";

no, this is what the original item.html becomes.

In my program $GLOBALS['root_dir'] is the root directory of the program,
$GLOBALS['dir'] is created based on the current item number,
like /var/www/htdocs/items_for_sale/item1 

Thanks,
dan.


> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> We are all dying -- and we're gonna be dead for a long time.
> */
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote:
> My best guess from skimming your code is that you need:
> 
> global $_POST;
> 
> in the function that uses $_POST.
> 
> Or is $_POST always global anyway?
> 
> I always forget, because they changed it around on POST/GLOBALS/etc at
> some point, but only on some of them.  Grrr.
> 

After reading this again, the function does not use $_POST at all.

here it is again.

function html_template() {
global $item_pics1;
if (file_exists('item.html')) {
print "This is item_pics1" . $item_pics1;
$html_template = $GLOBALS['html_template'];
$html_template = str_replace('{item_pictures}', $item_pics1,
$html_template);
$html_template = str_replace('{title}', $GLOBALS['title'],
$html_template);
$html_template = str_replace('{description}',
$GLOBALS['descrip'], $html_template);
$html_template = str_replace('{price}', $GLOBALS['price'],
$html_template);
$item_file_name = $GLOBALS['root_dir'] . "/" . $GLOBALS['dir'] .
"/item.html";
$item_fh = fopen($item_file_name, 'x+');
fwrite($item_fh, $html_template);
} else {
$GLOBALS['errors'] .= "item.html template does not exsit";
}
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 15:39 -0500, Roger Spears wrote:
> Danny Brow wrote:
> > On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote:
> > 
> >>Danny Brow wrote:
> >>
> >>>Below is a snip of a program I am writing, I am a little new to php.
> >>>Any how, I can't for the life me figure out why one of my functions
> >>>cannot grab the item_pics1 variable. I have tried passing the variable
> >>>to the function, tried using $GLOBALS['item_pic1']. So I guess my
> >>>question is, does PHP in some cases need to have a variable in a if
> >>>statement sent back to the global scope? everything works but the
> >>>str_replace item_pics1. Hope this is enough code.
> 
> 
> This may seem a little simple, but it's happened to me.  Are you sure 
> the variable has a value?

Yes, I can do a print $item_pics before and after the function.

dan.

PS. Roger, sorry for sending this to you twice, you sent your reply to directly 
and not to the list.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote:
> My best guess from skimming your code is that you need:
> 
> global $_POST;
> 

should I put this at the top of my code with the rest of my variables?

> in the function that uses $_POST.
> 
> Or is $_POST always global anyway?
No. 

> 
> I always forget, because they changed it around on POST/GLOBALS/etc at
> some point, but only on some of them.  Grrr.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote:
> Danny Brow wrote:
> > Below is a snip of a program I am writing, I am a little new to php.
> > Any how, I can't for the life me figure out why one of my functions
> > cannot grab the item_pics1 variable. I have tried passing the variable
> > to the function, tried using $GLOBALS['item_pic1']. So I guess my
> > question is, does PHP in some cases need to have a variable in a if
> > statement sent back to the global scope? everything works but the
> > str_replace item_pics1. Hope this is enough code.
> 
> 
> If you want to use a variable from outside the function, you either have 
> to pass it to the function; if you want to change it, you have to pass 
> it by reference, or make it global inside the function
> 
> function foo ( $bar ) {
>   /--code--/
> }
>
> function foo ( &$bar ) {
>   /--code--/
> }
> 
> function foo() {
>   global $var;
>   /--more code--/
> }
> 
See this is where the confusion is, I've tried all these and it still
does not work.  I'm going to read the whole page on variable scope a few
times, see if I missed something.  Maybe it's something else in my code
screwing my up.

Thanks.
Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Unsubscribing Junk Emails From the List: requests@firstustrading.com

2004-12-09 Thread Danny Brow
I'm getting it too.

On Thu, 2004-12-09 at 09:49 -0800, Justin Palmer wrote:
> Hi,
> 
> Every time I send a response to the list I get a auto-reply from:
> [EMAIL PROTECTED]
> 
> Is there someone that I could email that can delete this user from the
> list?
> 
> Thanks for any information.
> 
> Regards,
> 
> Justin Palmer
> __
> KISS (Keep It Simple, SEARCH)!
> Google::getUri( http://www.google.com );
> Archives::getUri( http://marc.theaimsgroup.com/?l=php-general );
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
Below is a snip of a program I am writing, I am a little new to php.
Any how, I can't for the life me figure out why one of my functions
cannot grab the item_pics1 variable. I have tried passing the variable
to the function, tried using $GLOBALS['item_pic1']. So I guess my
question is, does PHP in some cases need to have a variable in a if
statement sent back to the global scope? everything works but the
str_replace item_pics1. Hope this is enough code.


if (array_key_exists('pictures', $_POST)) {
$how_many_pics = $_POST['pictures'];
picture_input($how_many_pics);
//process_errors();
$k = '1';
while ($k <= $how_many_pics) {
$item_pics1 .= "";
$item_pics1 .= "";
$k++;
}
html_form($title, $price, $descrip, $current_items,
$title_file_name, $errors);
} else {
print '';
print 'How Many pictures do you have?: ';
print '';
}



function html_template() {
if (file_exists('item.html')) {
$html_template = $GLOBALS['html_template'];
$html_template = str_replace('{pictures2}',
$GLOBALS['item_pics1'], $html_template);
$html_template = str_replace('{title}', $GLOBALS['title'],
$html_template);
$html_template = str_replace('{description}',
$GLOBALS['descrip'], $html_template);
$html_template = str_replace('{price}', $GLOBALS['price'],
$html_template);
$item_file_name = $GLOBALS['root_dir'] . "/" . $GLOBALS['dir'] .
"/item.html";
$item_fh = fopen($item_file_name, 'x+');
fwrite($item_fh, $html_template);
} else {
$GLOBALS['errors'] .= "item.html template does not exsit";
}
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] probably stupid, but...

2004-11-12 Thread Danny Brow
On Fri, 2004-11-12 at 14:35 -0600, Jay Blanchard wrote:
> [snip]
> Did that and it fixed only that piece (saw it right after I sent the
> email out 
> to the group).  I am thinking that it is still somewhat of the
> iterations that 
> are causing problems.  I am waiting on the server guy to get back with
> me as to 
> what the new error message looks like.
> [/snip]
> 
> Have you echo'd the query out to see what it looks like?
> 

It's probably a good idea to get the part of a reply that tells everyone
who your replying too. Not sure if it was me or Chris P.

Chris has a way better answer then I. So I assume your replying to mine.

Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] probably stupid, but...

2004-11-12 Thread Danny Brow
On Fri, 2004-11-12 at 15:08 -0500, Robert Sossomon wrote:
> I have a form that sends 20 rows of data into a script, instead of having to 
> write 20 separate add functions, I wrote this piece of code...
> 
> $i=1;
> while ($i<20)
> {
>   if ($_POST[book_title_$i]' != "") 
// One problem maybe the quote you have at the end of your $_POST
request.

>   {
>INSERT INTO `curriculum` VALUES 

// You could probably simplify this with a while or for loop. But I'm no
PHP expert. Perhaps you could use an array to clean this up.

> ('','$_POST[book_title_$i]','$_POST[book_level_$i]','$_POST[level_grades_$i]','$_POST[book_section_$i]','$_POST[chapter_$i]','$_POST[chapter_title_$i]','$_POST[lesson_title_$i]','$_POST[skill_$i]','$_POST[life_skill_$i]','$_POST[success_indicator_$i]','$_POST[ncscos_$i]','$_POST[subject_$i]','$_POST[pages_$i]','$_POST[c_kit_$i]');
> 
>$message .= "The entry  $i was entered
> ";
>   $i++;
>   }
>   else
> {  $i++; }
> }
> 

Sorry if I missed anything else :->

Dan.


> But I get THIS error in the log:
>   [12-Nov-2004 14:59:19] PHP Parse error:  parse error, unexpected  
> T_VARIABLE, 
> expecting ']' in  /home/public/html/depts/fourh/curriculum_form_post.php on 
> line 19
> 
> -
> 
> How can I go about iterating through the script?  or do I just need to write 
> 20 
> if/else statements and separate inserts?
> 
> Thanks,
> Robert
> 
> -- 
> Robert Sossomon, Business and Technology Application Technician
> 4-H Youth Development Department
> 200 Ricks Hall, Campus Box 7606
> N.C. State University
> Raleigh NC 27695-7606
> Phone: 919/515-8474
> Fax:   919/515-7812
> [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Creating a directory

2004-11-12 Thread Danny Brow
On Fri, 2004-11-12 at 17:12 +, Jason Wong wrote:
> On Friday 12 November 2004 08:54, Danny Brow wrote:
> > What's the best way to create a directory with PHP, I tried using:
> >
> > if (array_exists('dir',$_POST)) {
> >  $dir_name = test123;
> 
> I'm 99% sure you mean 'test123'.

I meant $dir_name = $_POST['dir']; This works with out the single quote.
but all my variables have single or double quotes around them.

> 
> >  shell_exec('mkdir $dir_name');
> 
> I'm 100% sure you meant to use " instead of '.

this is how I normally do this when declaring variables, but that maybe
the difference here. 

> 
> > } else {
> > print "Get get some coffee!";
> 
> I'm 50% sure that should be print "RTFM".

RTFM > /dev/null :)


I'm 25-50% sure that this was a complete waste of a reply to a question.


> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> I like your SNOOPY POSTER!!
> */
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Creating a directory

2004-11-12 Thread Danny Brow
Thanks, I should have looked that up. 4am, time for bed.

Thanks again,
Dan.

On Fri, 2004-11-12 at 18:01 +0900, Pluance wrote:
> Use mkdir in PHP Functions.
> See Also: http://www.php.net/manual/en/function.mkdir.php
> 
> On Fri, 12 Nov 2004 03:54:52 -0500, Danny Brow <[EMAIL PROTECTED]> wrote:
> > What's the best way to create a directory with PHP, I tried using:
> > 
> > if (array_exists('dir',$_POST)) {
> >$dir_name = test123;
> >shell_exec('mkdir $dir_name');
> > 
> > I don't want to have to declare a variable, I would like to do this all
> > on one line. Like:
> >shell_exec('mkdir $_POST['dir']'); // but it don't work
> > } else {
> >print "Get get some coffee!";
> > }
> > 
> > I'll be putting some error checking in later :)
> > 
> > Thanks,
> > Dan.
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> >
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Creating a directory

2004-11-12 Thread Danny Brow
What's the best way to create a directory with PHP, I tried using:

if (array_exists('dir',$_POST)) {
$dir_name = test123;  
shell_exec('mkdir $dir_name'); 

I don't want to have to declare a variable, I would like to do this all
on one line. Like:
shell_exec('mkdir $_POST['dir']'); // but it don't work
} else {
print "Get get some coffee!";
}

I'll be putting some error checking in later :)

Thanks,
Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Accelerator

2004-11-07 Thread Danny Brow
On Sun, 2004-11-07 at 07:55 +0200, Jyry Kuukkanen wrote:
> On Sun, 7 Nov 2004, raditha dissanayake wrote:
> 
> > David wrote:
> > 
> > > I need a PHP accelerator but am not sure which one to use. I would 
> > > highly prefer to not use a commercial accelerator and need one that 
> > > works with PHP 5. Does anyone recommend one out of the ones that exist?
> > >
> > this one:
> > 
> > > - Turck MMCache for PHP
> 
> 
> I second that, unless you need it with latest PHP4.3.x, that Turck MMCache 
> does not support currently. Then the free option known to work is 
> PHP-Accelerator.
> 

According to the website:

"This version of the Turck MMCache has been successfully tested on PHP
4.1.0-4.3.3 under RedHat Linux 7.0, 7.3, 8.0 and Windows with Apache 1.3
and 2.0."

But David asked for something that works with PHP 5. It seems that most
work with the 4.x releases of PHP.

Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] VOTE TODAY

2004-11-02 Thread Danny Brow
On Tue, 2004-11-02 at 10:50 -0700, Grant wrote:
> > I can't wait for the replies...
> 
> Here's a reply:
> 
> Don't vote for Bush.
> 
> - Grant
> 


I'm Canadian, please stop wasting my bandwidth.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Learning PHP5

2004-10-28 Thread Danny Brow
On Thu, 2004-10-28 at 20:20 -0500, Greg Donald wrote:
> On Thu, 28 Oct 2004 19:12:12 -0400, Michael Lauzon <[EMAIL PROTECTED]> wrote:
> > Unfortunately the PHP.net are not really for beginners, you have to
> > have some programming knowledge to get started using their
> > tutorials...this is just my opinion.
> 
> Well you're certainly entitled to your opinion..
> 
> I program in multiple languages as do many people on this list.  And I
> for one have to say that it doesn't get any more simple than PHP and
> the ease of learning you get from it's excellent online manual.  No
> other programming manual even comes close.  You get well documented
> usage examples plus hundreds if not thousands of user comments that
> often contain even more coding examples.  Being able to teach yourself
> kinda goes along with being a programmer.. and PHP.net totally
> accelerates that function.
> 
> Go out and try to learn Perl, Python, Java, or C (with no prior
> programming knowledge) and get back to me.  It's certainly possible,
> but I wouldn't want to learn Perl again from scratch.
> 
I have to agree with this, Learning PHP 5 and the online manual are
making this very easy for me, I can almost say it's as easy as HTML. But
this maybe because I know perl.

Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Learning PHP5

2004-10-28 Thread Danny Brow
On Thu, 2004-10-28 at 15:03 -0700, Matthew Sims wrote:
> About a week ago someone was asking where are beginner can go to learn
> PHP5? This book was just advertised on Slashdot.
> 
> Learning PHP 5
> Only $20 on Amazon.com
> http://www.amazon.com/exec/obidos/tg/detail/-/0596005601/qid=1099000383/sr=8-1/ref=pd_csp_1/104-8763861-9120755?v=glance&s=books&n=507846
> 

I'm using it now and it's pretty good. I am almost 3/4 done the book
after a week and half (including exercises). 

Dan.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php