Re: [PHP] SQL statement for clearing a table

2001-06-22 Thread Adam Wright
DELETE FROM table_name; adamw - Original Message - From: "Wilbert Enserink" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 22, 2001 1:17 PM Subject: [PHP] SQL statement for clearing a table > Hi all, > > anybody knows the mysql statement for clearing the contents of a t

Re: [PHP] removing double backslashes and leaving singles

2001-05-22 Thread Adam Wright
Don't forget you need to escape the backslashes both for PHP and the regular expression engine. So, if you want to match \\, you need to escape for php, then escape them both again for regex . matches just one real backslash :) adamw - Original Message - From: "Dennis G

Re: [PHP] Recursively create directories

2001-05-15 Thread Adam Wright
This should do what you want... $dir = "dir1/dir2/dir3/dir4"; $dir_array = explode("/",$dir); $full_path = ""; foreach($dir_array as $current_dir) { $full_path .= "/$current_dir"; if (!is_dir($DOCUMENT_ROOT . $full_path)) { mkdir($DOCUMENT_ROOT."/" .$full_path,0700); } } adamw -

Re: [PHP] isset() VS if($var)

2001-04-09 Thread Adam Wright
isset actually sees if the variable exists, and has been assigned a value (where if is obviously checking for boolean truthfulness). Thus... $a = 0; if (isSet($a)) print "A is set"; //This line will execute if (isSet($b)) print "B is set"; //This line never will, as B has not been set to an

Re: [PHP] Permission denied

2001-03-23 Thread Adam Wright
If you have shell access to the box, you can chgrp some stuff and allow PHP to write to it. Otherwise, you'll have to talk to the ISP directly (get them to setup setuid versions of common shell commands for this sort of requirement). There is no way to make PHP 'login', any as PHP is server side,

Re: [PHP] Permission denied

2001-03-23 Thread Adam Wright
Don't forget, PHP (in general) runs as the webserver (normally "nobody" or "apache" for Apache servers). Make sure your webserver has write access to /home/jalmberg/public_html/qiksys/images/ adamw - Original Message - From: "John Almberg" <[EMAIL PROTECTED]> To: "PHP General List" <[EMA

Re: [PHP] Generate Random Letters?

2001-03-09 Thread Adam Wright
I use something like... function randString($sequence_length = 7) $possible_letters = "abcdefghijklmnopqrstuvwxzy"; $sequence = "" while ($sequence_length--) { $sequence .= $possible_letters[rand(0, strlen($possible_letters) - 1)]; } return $sequence; } To create random strings.

Re: [PHP] GTK-PHP install doubt?

2001-03-08 Thread Adam Wright
Make sure you're building against a 4.0.5 build of PHP. I tried this afternoon with the latest PHP from snaps.php.net and the GTK bindings, and it worked flawlessly. adamw - Original Message - From: "Celestino Roberto Alejandro" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday,

Re: [PHP] Simple question!!!

2001-03-02 Thread Adam Wright
Don't use die (die just stops everything, nothing else gets send). > > Some Title > > $var = 1; > if ($var == 1) { > echo ("I'm dead"); > } else { > echo "I'm alive"; > } > ?> > > - Original Message - From: "Ricardo D'Aguiar" <[EMAIL PROTECTED]> To:

Re: [PHP] Compiler? (Was Re: [PHP] PHP site on CD-ROM)

2001-01-25 Thread Adam Wright
The compiler has become the encoder, because it's rather hard to meet the expectations of a 'compiler' (many would expect it to produce binaries and heavily optimised code). Encoder makes more sense, based on what the product does. adamw - Original Message - From: "Angus Mann" <[EMAIL PR

Re: [PHP] Encoder price too high (was: Zend hit)

2001-01-25 Thread Adam Wright
We are working on extending the APC cache (http://apc.communityconnect.com) with an encoder, and already have a pretty much functioning version (though its a bit of hack job at the moment :). I think the patches we made were sent to the dev list, but I can send them around at request. adamw

Re: [PHP] PATH_TRANSLATED doesn't work correctly !!!

2001-01-19 Thread Adam Wright
Its a PHP bug, I've attached a patch (that they persistantly ignore :). adamw - Original Message - From: "Heino H. Gehlsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 19, 2001 10:42 AM Subject: [PHP] PATH_TRANSLATED doesn't work correctly !!! I'm trying to use th

Re: [PHP] ASP Guy Looking for "Select Case" equivalent

2001-01-19 Thread Adam Wright
switch adamw - Original Message - From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]> To: "PHP Mailing List" <[EMAIL PROTECTED]> Sent: Friday, January 19, 2001 3:51 PM Subject: [PHP] ASP Guy Looking for "Select Case" equivalent > Hello, > > What is the equivalent command to Select Case as

Re: [PHP] include statement

2001-01-17 Thread Adam Wright
, investigate "Safe mode" this instant :) adamw - Original Message - From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]> To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Michael Zornek" <[EMAIL PROTECTED]> Sent: Wednesday, Januar

Re: [PHP] include statement

2001-01-17 Thread Adam Wright
) doesnt. So, readfile uses less resources, and is much more like the SSI include statement than PHP's include :) adamw - Original Message - From: "Michael Zornek" <[EMAIL PROTECTED]> To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent:

Re: [PHP] include statement

2001-01-17 Thread Adam Wright
This is because the PHP include statement is ment to include other blocks of PHP code, rather than bits of HTML. Hence, it includes things from anywhere on the system. To include things from under your current htdocs directory, use... include($DOCUMENT_ROOT . "/includes/metatags.include"); thoug