Re: [PHP-DB] File retrieval

2005-04-03 Thread Mark Cain
You could read this: http://php.net/fread or try this -- assuming that this is a non-windows OS: Mark Cain - Original Message - From: "Ron Piggott" <[EMAIL PROTECTED]> To: "PHP DB" Sent: Friday, April 01, 2005 11:43 PM Subject: [PHP-DB] File retrieval > If I have a file named >

RE: [PHP-DB] File retrieval

2005-04-03 Thread Bastien Koert
of course, there are a number of file system option syou can use depending on how you;d like the data to be handled, from being put into an array to simply storing the entire file as a string start with file http://www.php.net/file or fread http://www.php.net/fread Bastien From: "Ron Piggott" <

[PHP-DB] eregi problem

2005-04-03 Thread emre
I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha numeric chars only. here, how I check the variable: if((eregi("[^a-zA-Z0-9]",$GP[sifre]) echo 'true'; else echo 'false'; It works if variable starts with alphabetic chars only. for example this returns 'ok' $GP[

Re: [PHP-DB] eregi problem

2005-04-03 Thread Mark Cain
Almost. But since this is not horseshoes nor hand grenades... Here is a trap for A/N characters: if (eregi("^[a-zA-Z0-9]+$",$GP[sifre])) { corrections to your code: Move the carat to the outside of the bracket -- I think the carat inside the bracket means negation (I think). You want a startin

Re: [PHP-DB] File retrieval

2005-04-03 Thread Calvin Lough
The methods suggested above would all work but if you would like to do in one step you could use file_get_contents(). This method does not require you to open/close the file and will automatically read the entire file into your array. Calvin On Apr 3, 2005 10:23 AM, Bastien Koert <[EMAIL PROTEC

[PHP-DB] That crazy IF command!

2005-04-03 Thread Ron Piggott
Hey guys ... I am wondering if you have a varable named $query_holder="the big fat cow made lots of milk today"; are you able to use the if command to see if the words "big fat" are part of that phrase? What would the syntax be? Ron -- PHP Database Mailing List (http://www.php.net/) To unsubs

Re: [PHP-DB] That crazy IF command!

2005-04-03 Thread Justin Gruenberg
On Apr 2, 2005 3:52 PM, Ron Piggott <[EMAIL PROTECTED]> wrote: > Hey guys ... I am wondering if you have a varable named > > $query_holder="the big fat cow made lots of milk today"; > > are you able to use the if command to see if the words "big fat" are part of > that phrase? > > What would the

Re: [PHP-DB] That crazy IF command!

2005-04-03 Thread Ron Piggott
Many thanks! Ron - Original Message - From: Justin Gruenberg <[EMAIL PROTECTED]> To: Ron Piggott <[EMAIL PROTECTED]>; Sent: Sunday, April 03, 2005 3:05 PM Subject: Re: [PHP-DB] That crazy IF command! > On Apr 2, 2005 3:52 PM, Ron Piggott <[EMAIL PROTECTED]> wrote: > > Hey guys ... I am

Re: [PHP-DB] That crazy IF command!

2005-04-03 Thread Bastien Koert
stristr is another way www.php.net/stristr Bastien From: Justin Gruenberg <[EMAIL PROTECTED]> Reply-To: Justin Gruenberg <[EMAIL PROTECTED]> To: Ron Piggott <[EMAIL PROTECTED]>, php-db@lists.php.net Subject: Re: [PHP-DB] That crazy IF command! Date: Sun, 3 Apr 2005 15:05:30 -0500 On Apr 2, 2005 3:5

Re: [PHP-DB] That crazy IF command!

2005-04-03 Thread Josip Dzolonga
Matthew Weier O'Phinney wrote: > if (strpos($query_holder, "big fat")) { > // found > } That's completely wrong. Well try this : $string = "big fat fatty"; if (strpos($string, "big fat")) echo 'found'; else echo 'not found'; It will always return false, because strpos in this case r

RE: [PHP-DB] Why does this code/query hang & time out ?

2005-04-03 Thread -{ Rene Brehmer }-
... inline ... for ease: At 23:53 31/03/2005, Juffermans, Jos wrote: So far, I have found a few mistakes in your SQL: $query .= " OR `variant` LIKE '%".$_GET['search']."%'"; Why do you have backtick-quotes around variant? Know that backticks are used to call system commands. You also use th

Re: [PHP-DB] Blob problem (php and oracle)

2005-04-03 Thread Christopher Jones
Here are some things you could try. Remove all the "@" suppressions and make sure error_reporting = E_ALL and display_errors = On are set in your php.ini. Echo the SQL statement inside SQLInsertLob() to make sure it is constructed OK. Echo the filename to check it includes the appropriate path. If