Re: AW: [PHP-DB] image resizing

2003-11-25 Thread Kim Steinhaug
Imagemagick is THE preferred sollution, since downsizing
images makes them blurry. With imagemagick you can sharpen
then afterwards, and they are brand new shiny funky thumbs!

There is a tutorial on phpbuilder.com which describes and shows
a live example on how to incorporate the ImageMagick power
into your scripts. You do however need to install the ImageMagick
module on the server (windows is easy, hust depack the files and
point to migrify.exe, no need to install it its just a bunch of DLLs).
If your hosting provider doesnt want to install ImageMagick, you
have to use GD. Nice class for GD just released on phpclasses.org
by the way. You need however to reprogram some og the scaling
functions, as they are a bit unfinnished.

I use GD as a backup, in case ImageMagick isnt present on
the server. But then I get those blurry ones I dont like...

-- 
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---


Christopher Ostmo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Stefan Siefert pressed the little lettered thingies in this order...

  There are several possibilities to do this... first PHP has the
possibility
  to use the GD - Libs (which doesn't support Gif's because of licence
  problems). The second (and in my opinion better) posibility is
ImageMagick
  which are some programs to modify pictures (you have to call them
externaly
  from your php - scripts) (www.imagemagick.org). I think, I have seen
several
  Tutorials to do so (PHP/ImageMagick) but on the fly.. I don't find them
in
  my bookmarks now...
 
  Hope this helps,
 
  Stefan Siefert
 
  -Ursprungliche Nachricht-
  Von: Adv. Systems Design [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 9. Juli 2001 16:04
  An: [EMAIL PROTECTED]
  Betreff: [PHP-DB] image resizing
 
 
  Is there a way of sizing image resolution on the fly?
 
  TIA
 

 If you have ImageMagick, you only need to use the mogrify command:
 exec(/usr/local/bin/mogrify -geometry 300x300 image.jpg);

 This isn't built in to PHP, but it works very well if you have access to
it.

 Christopher Ostmo
 a.k.a. [EMAIL PROTECTED]
 AppIdeas.com
 Innovative Application Ideas
 Meeting cutting edge dynamic
 web site needs since the
 dawn of Internet time (1995)

 For a good time,
 http://www.AppIdeas.com/

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



[PHP-DB] Re: Validating a Session value

2003-11-25 Thread Kim Steinhaug
First you need to alter you else if statements, you write :

If $session_ValueA $100 and  $499 set $session_fee=$20

I would write :

if(($session_ValueA =100) and ($session_ValueA =499)){
$session_fee=20;
}

And as you see, you cant evaluate $20 since PHP doesnt know
that $20 is 20 dollars. It assumes its a variable with name of 20.
The $ (dollarsign), in your case, is just for show. Same goes for the
fee. You will need to work with the numbers only, knowing their
currency, then when you print it out you can typically  :

echo '$' . $session_fee;

Have another go!

-- 
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---


Aleks Kalynovych [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi all,

I am trying to figure out a way to calculate a value based on another value
and then set that value in a session variable.

So, if $session_ValueA = $100 set $session_fee = $10
Or
If $session_ValueA $100 and  $499 set $session_fee=$20
Or
If $session_VAlueA $499 and $999 set $session_fee=$50

Or something like this., I have to evaluate $session_ValueA to 6 possible
values.

Once this is done, I also would like to be able to calculate a % of
Session_ValueA
As commission. I tried to use If, Else but can't seem to get it right..

Any suggestions?? Thanks

Aleks =

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



Re: [PHP-DB] strings of variables,php, sql

2003-11-25 Thread Joffrey Leevy

--- George Patterson [EMAIL PROTECTED] wrote:
 On Mon, 24 Nov 2003 21:36:29 -0800 (PST)
 Joffrey Leevy [EMAIL PROTECTED] wrote:
 
  Would appreciate in anyone can help me.
  
  Let's say I do a query in php, eg. $query =
 select
  shed from structure;  With the mysql_fetch_array
  function and a loop I could see all the values
 stored
  in the column, shed, using the command: echo
 $shed;
  
  Let's say now that I am carrying over a variable
 from
  a form called $form where $form = shed.  I can
 still
  say $query = select $form from structure;
 because
  $form = shed.
  
  The problem I have now is with the strings and how
 do
  I see my column values.
  
  Using echo $$value; or echo $($value) or echo
 \$$value
  or echo $$value does not give me the values
 stored
  in the column shed.
  
  Help anyone?
  thanks
  
 
 Joffrey,
 
 First it is easier for us if you just paste the
 relevant code but I'll
 try and assist without.
 
 Before you can fetch a record you must query the
 database..
 $result=mysql_query($query) or die( Bad Query=
 $query\nbr.
 mysql_error() );
 
 The die() function will print an error if there is
 something wrong with
 the query such as database not opened first.
 
 You are fetching a row (or record) from the
 database.
 
 $row=mysql_fetch_array($result);
 
 therefore the value of shed column will be contained
 within $row.
 
 It can be accessed by either of the two lines below.
 
 echo $row[0]; #by numeric index..
 echo $row[shed];#or by column name..
 
 If you wish to find out all the column names and
 values, try
 
 print_r($row);
 
 
 George Patterson
 
Ok, I see, so if the column  name was a variable
called $form passed from a previous page where $form
could hold any value (shed,house,bungalow, etc), then
I could do
echo $row[$form];

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



[PHP-DB] send email

2003-11-25 Thread redhat
I have created a simple form that dumps input information into a mysql
database.  The person that I created it for said it would be nice if it
would also notify him by email that an entry was added to the database. 
I have no idea where to begin with that - any ideas?
thanks,
DF

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



Re: [PHP-DB] send email

2003-11-25 Thread jeffrey_n_Dyke

www.php.net/mail




   
 
  redhat   
 
  [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   
  ic.com  cc: 
 
   Subject:  [PHP-DB] send email   
 
  11/25/2003 08:43 
 
  AM   
 
   
 
   
 




I have created a simple form that dumps input information into a mysql
database.  The person that I created it for said it would be nice if it
would also notify him by email that an entry was added to the database.
I have no idea where to begin with that - any ideas?
thanks,
DF

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

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



RE: [PHP-DB] send email

2003-11-25 Thread Jacob A. van Zanen
Hi,


Here a bit of code that I use in a members list (this is the update bit)

CODE SNIPPET

if (isset ($_GET['update']) OR isset ($_POST['update']))
{
$db  = @mysql_connect(localhost, username,password);
mysql_select_db(walvis,$db);
if(isset($_POST['enter']))
{
$sql=update ledenlijst set
naam='$_POST[naam]',
voornaam='$_POST[voornaam]',
straat='$_POST[straat]',
postcode='$_POST[postcode]',
woonplaats='$_POST[woonplaats]',
telefoon='$_POST[telefoon]',
mobiel='$_POST[mobiel]',
email='$_POST[email]',
brevet='$_POST[brevet]'
where id = $_POST[id];
$result=mysql_query($sql);
print(meta http-equiv=\refresh\ content=\0;
URL=ledenlijst.php\);
$addr=$_SERVER[REMOTE_ADDR];
$agent=$_SERVER[HTTP_USER_AGENT];
$mailto=[EMAIL PROTECTED],$_POST[email];
$mailsubject=Your entry was updated on the Walvis
Ledenlijst;
$mailbody=Your entry was updated new info is:\n;
$mailbody.=Voornaam: $_POST[voornaam]\n;
$mailbody.=achternaam: $_POST[naam]\n;
$mailbody.=Straat: $_POST[straat]\n;
$mailbody.=Postcode: $_POST[postcode]\n;
$mailbody.=Woonplaats: $_POST[woonplaats]\n;
$mailbody.=telefoon: $_POST[telefoon]\n;
$mailbody.=mobiel:$_POST[mobiel]\n;
$mailbody.=e-mail: $_POST[email]\n;
$mailbody.=If this was done in error please send mail
to mailto:[EMAIL PROTECTED];
$mailbody.=Thanx!!\n;
$mailbody.=\n;
$mailbody.=\n;
$mailbody.=Changing IP address: $addr\n;
$mailbody.=Changing Browser: $agent\n;
print mail
($mailto,$mailsubject,$mailbody,FROM:[EMAIL PROTECTED]);
}
/CODE SNIPPET



Good Luck


Jack



-Original Message-
From: redhat [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2003 2:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] send email


I have created a simple form that dumps input information into a mysql
database.  The person that I created it for said it would be nice if it
would also notify him by email that an entry was added to the database. 
I have no idea where to begin with that - any ideas?
thanks,
DF

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

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



[PHP-DB] Re: nested sets?

2003-11-25 Thread Hans Lellelid
 You may want to try the famous Joe Celko's approach that he described in
 this book:

 Book review: SQL for Smarties
 http://www.phpclasses.org/products.html/id/1558605762.html

Also, be sure to check our the PEAR classes DB_NestedSet/MDB_NestedSet 
which will make using this model much, much easier.

But do buy the book, because it's awesome.

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


[PHP-DB] Oracle to Sybase PHP question

2003-11-25 Thread Jon Davis
Hello PHP gurus,

I have just started to learn PHP, since I have inherited some previous PHP 
scripts that I must maintain.

My question is this:  I have to write a script that gets data from a view in 
Oracle.  I then need to insert that data into a Sybase database.  Can this 
be done?  This will run every 5 minutes.  The view could produce 0 rows of 
data or multiple rows of data, so I guess I would need to use an array of 
some kind.

Anyone have any ideas that could point me in the right direction?

Thanks
Jion
_
From the hottest toys to tips on keeping fit this winter, you’ll find a 
range of helpful holiday info here.  
http://special.msn.com/network/happyholidays.armx

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


RE: [PHP-DB] Splitting a CSV file

2003-11-25 Thread Ryan Jameson (USA)
I've never seen where the file size causes a problem that wasn't one of
the file size settings either in the upload form or php.ini. I'd focus
on figuring out why it's failing on the large files before trying to
split it. No errors at all? Just a blank screen? Are you uploading the
file through a browser? 

 Ryan 

-Original Message-
From: Matt Babineau [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 2:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Splitting a CSV file

Chris,

If you are on a Redhat machine, you could try running a CLI command on
this.

Try looking up the 'split' command, it may solve your problem if you
combine it with some PHP.

-Matt

On Mon, 2003-11-24 at 19:14, Chris Payne wrote:
 Hi there everyone,
 
 I'm writing an automation system to automatically insert data into a
mysql database from a CSV file, and it works great - until I try to
insert a large file, then it just doesn't do anything.
 
 I've set my PHP filesize to 10 Megs so that's not the issue, and a
server timeout isn't the issue either.  So, is that a way that I can
split a CSV file into 2 files if it's larger than a certain size so that
I can still use the automation I am working on?
 
 Actually, I won't see the files as it's for a company who just wants 
 to be able to select their CSV file (No matter what size) and it will 
 insert it automatically, and as I said it does work on small files but

 not large :-(
 
 Any help would really be appreciated.
 
 Chris

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

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



RE: [PHP-DB] send email

2003-11-25 Thread Ryan Jameson (USA)
You may want to loop through the form results and create the message
body dynamically based on the info from the form as well. PHP's mail
function is the easiest of any scripting language I've used.
www.php.net/mail

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2003 6:46 AM
To: redhat
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] send email


www.php.net/mail




 

  redhat

  [EMAIL PROTECTED]To:
[EMAIL PROTECTED]

  ic.com  cc:

   Subject:  [PHP-DB] send
email
  11/25/2003 08:43

  AM

 

 





I have created a simple form that dumps input information into a mysql
database.  The person that I created it for said it would be nice if it
would also notify him by email that an entry was added to the database.
I have no idea where to begin with that - any ideas?
thanks,
DF

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

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

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



RE: [PHP-DB] Oracle to Sybase PHP question

2003-11-25 Thread Ryan Jameson (USA)
I haven't done it in a while but Oracle can write to Sybase directly
using a linked server connection. PHP should not be necessary in this
case. Though PHP is the best scripting language out. :-)

 Ryan 

-Original Message-
From: Jon Davis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2003 9:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Oracle to Sybase PHP question

Hello PHP gurus,

I have just started to learn PHP, since I have inherited some previous
PHP scripts that I must maintain.

My question is this:  I have to write a script that gets data from a
view in Oracle.  I then need to insert that data into a Sybase database.
Can this be done?  This will run every 5 minutes.  The view could
produce 0 rows of data or multiple rows of data, so I guess I would need
to use an array of some kind.

Anyone have any ideas that could point me in the right direction?

Thanks
Jion

_
From the hottest toys to tips on keeping fit this winter, you'll find a
range of helpful holiday info here.  
http://special.msn.com/network/happyholidays.armx

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

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



Re: [PHP-DB] Splitting a CSV file

2003-11-25 Thread Tiberiu Ardeleanu
try to parse the csv file line by line and you won't have memory problems
ever:
===
$d = \t; // fields delimiter
$fp = fopen ($file_name, r);
while ($arr_row = fgetcsv ($fp, 4096, $d, )) {
do_something ($arr_row);
}
 fclose ($fp);
===
(fgetcsv returns an array containing the fields read.)

Tiberiu


- Original Message - 
From: Chris Payne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 1:14 AM
Subject: [PHP-DB] Splitting a CSV file


Hi there everyone,

I'm writing an automation system to automatically insert data into a mysql
database from a CSV file, and it works great - until I try to insert a large
file, then it just doesn't do anything.

I've set my PHP filesize to 10 Megs so that's not the issue, and a server
timeout isn't the issue either.  So, is that a way that I can split a CSV
file into 2 files if it's larger than a certain size so that I can still use
the automation I am working on?

Actually, I won't see the files as it's for a company who just wants to be
able to select their CSV file (No matter what size) and it will insert it
automatically, and as I said it does work on small files but not large :-(

Any help would really be appreciated.

Chris

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



Re: [PHP-DB] Splitting a CSV file

2003-11-25 Thread Ignatius Reilly
You may have hit the browser time-out limit, which you can not control (at
least for IE; don't know about others).

To prevent this, arrange for the script send regularly some invisible
content to the browser
(eg send a HTML comment line every 100 lines of your CSV file)

HTH
Ignatius
_
- Original Message -
From: Chris Payne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 18:54
Subject: Re: [PHP-DB] Splitting a CSV file


 Hi there,

 I did a test on my local machine, set the upload limit for PHP to 50Megs
for
 forms (WAAA more than I need, but then atleast I know that isn't the
 problem).

 Then, I select the file through my web form, put in the delimiter which
 works great on small files.  Then, I try the larger file - exactly the
same
 format (As I just cut a portion of the file and pasted into another file
 about with just about 50 entries to test which worked) and then click
send,
 but when I try to echo the result to debug, the array is totally empty,
and
 even tells me it is empty, but only when the file is above a certain size
 (Not worked out what size that is yet though).

 The file itself is around 5.4 megs, and I know it's not a server timeout
 issue as i've increased everything I could find in my local Apache config,
 from a timeout of 300 to 3000 (Again, just to eliminate all possible
courses
 that I can think of).  The only thing I can think of is that there is some
 illegal char somewhere in the file, but I have no idea what that could be.
 I'm using the straight line up as the delimiter to avoid any , issues etc
 . as I know that | isn't used in the file at all.

 It's just getting to me, there has to be a reason why :-(  I'm using the
 following code (Minus the bit that enters the DB into the database, as
that
 works fine with small files so would with large too):

 if ($option == importcsv) {

 if ($userfile == ){
 $failed = 'yes';
 } else {

 $row = 1;
 $handle = fopen ($userfile,r);
 while ($data = fgetcsv ($handle, 10, |)) {
 $num = count ($data);
 $row++;

 echo $data[0];;

 };
 fclose ($handle);

 }};

 Chris

  I've never seen where the file size causes a problem that wasn't one of
  the file size settings either in the upload form or php.ini. I'd focus
  on figuring out why it's failing on the large files before trying to
  split it. No errors at all? Just a blank screen? Are you uploading the
  file through a browser?
 
   Ryan
 
  -Original Message-
  From: Matt Babineau [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 24, 2003 2:37 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] Splitting a CSV file
 
  Chris,
 
  If you are on a Redhat machine, you could try running a CLI command on
  this.
 
  Try looking up the 'split' command, it may solve your problem if you
  combine it with some PHP.
 
  -Matt
 
  On Mon, 2003-11-24 at 19:14, Chris Payne wrote:
   Hi there everyone,
  
   I'm writing an automation system to automatically insert data into a
  mysql database from a CSV file, and it works great - until I try to
  insert a large file, then it just doesn't do anything.
  
   I've set my PHP filesize to 10 Megs so that's not the issue, and a
  server timeout isn't the issue either.  So, is that a way that I can
  split a CSV file into 2 files if it's larger than a certain size so that
  I can still use the automation I am working on?
  
   Actually, I won't see the files as it's for a company who just wants
   to be able to select their CSV file (No matter what size) and it will
   insert it automatically, and as I said it does work on small files but
 
   not large :-(
  
   Any help would really be appreciated.
  
   Chris
 
  --
  PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
  http://www.php.net/unsub.php
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



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



Re: [PHP-DB] Splitting a CSV file

2003-11-25 Thread Chris Payne
Hey there,

I just want to thank everyone for their time and help, you've all been so
valuable and solved my problems :-)  I needed the hidden max_file_size bit
in the form.  But i'm also going to look at all your other suggestions
you've all made, as what you say makes perfect sense from a coding point of
view :-)

Again thank you everyone, I don't know what i'd do without you all.

Regards

Chris - Crazy, but slightly less so than this morning :-)

 You may have hit the browser time-out limit, which you can not control (at
 least for IE; don't know about others).

 To prevent this, arrange for the script send regularly some invisible
 content to the browser
 (eg send a HTML comment line every 100 lines of your CSV file)

 HTH
 Ignatius
 _
 - Original Message -
 From: Chris Payne [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, November 25, 2003 18:54
 Subject: Re: [PHP-DB] Splitting a CSV file


  Hi there,
 
  I did a test on my local machine, set the upload limit for PHP to 50Megs
 for
  forms (WAAA more than I need, but then atleast I know that isn't the
  problem).
 
  Then, I select the file through my web form, put in the delimiter which
  works great on small files.  Then, I try the larger file - exactly the
 same
  format (As I just cut a portion of the file and pasted into another file
  about with just about 50 entries to test which worked) and then click
 send,
  but when I try to echo the result to debug, the array is totally empty,
 and
  even tells me it is empty, but only when the file is above a certain
size
  (Not worked out what size that is yet though).
 
  The file itself is around 5.4 megs, and I know it's not a server timeout
  issue as i've increased everything I could find in my local Apache
config,
  from a timeout of 300 to 3000 (Again, just to eliminate all possible
 courses
  that I can think of).  The only thing I can think of is that there is
some
  illegal char somewhere in the file, but I have no idea what that could
be.
  I'm using the straight line up as the delimiter to avoid any , issues
etc
  . as I know that | isn't used in the file at all.
 
  It's just getting to me, there has to be a reason why :-(  I'm using the
  following code (Minus the bit that enters the DB into the database, as
 that
  works fine with small files so would with large too):
 
  if ($option == importcsv) {
 
  if ($userfile == ){
  $failed = 'yes';
  } else {
 
  $row = 1;
  $handle = fopen ($userfile,r);
  while ($data = fgetcsv ($handle, 10, |)) {
  $num = count ($data);
  $row++;
 
  echo $data[0];;
 
  };
  fclose ($handle);
 
  }};
 
  Chris
 
   I've never seen where the file size causes a problem that wasn't one
of
   the file size settings either in the upload form or php.ini. I'd focus
   on figuring out why it's failing on the large files before trying to
   split it. No errors at all? Just a blank screen? Are you uploading the
   file through a browser?
  
Ryan
  
   -Original Message-
   From: Matt Babineau [mailto:[EMAIL PROTECTED]
   Sent: Monday, November 24, 2003 2:37 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP-DB] Splitting a CSV file
  
   Chris,
  
   If you are on a Redhat machine, you could try running a CLI command on
   this.
  
   Try looking up the 'split' command, it may solve your problem if you
   combine it with some PHP.
  
   -Matt
  
   On Mon, 2003-11-24 at 19:14, Chris Payne wrote:
Hi there everyone,
   
I'm writing an automation system to automatically insert data into a
   mysql database from a CSV file, and it works great - until I try to
   insert a large file, then it just doesn't do anything.
   
I've set my PHP filesize to 10 Megs so that's not the issue, and a
   server timeout isn't the issue either.  So, is that a way that I can
   split a CSV file into 2 files if it's larger than a certain size so
that
   I can still use the automation I am working on?
   
Actually, I won't see the files as it's for a company who just wants
to be able to select their CSV file (No matter what size) and it
will
insert it automatically, and as I said it does work on small files
but
  
not large :-(
   
Any help would really be appreciated.
   
Chris
  
   --
   PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
   http://www.php.net/unsub.php
  
   --
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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


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



[PHP-DB] sql query

2003-11-25 Thread pete M
why does this

select date(date_file_created) from files

create the error
error near  near '(date_file_created) from files' at line 1
trying to extract the date part of the date_tile filed

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


[PHP-DB] Re: sql query

2003-11-25 Thread pete M
got round the problem like this
select distinct(to_days(date_file_created)), date_file_created from files
Pete M wrote:

why does this

select date(date_file_created) from files

create the error
error near  near '(date_file_created) from files' at line 1
trying to extract the date part of the date_tile filed

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


Re: [PHP-DB] Splitting a CSV file

2003-11-25 Thread David T-G
Chris, et al --

...and then Chris Payne said...
% 
% Hey there,

Hiya!


% 
% I just want to thank everyone for their time and help, you've all been so
% valuable and solved my problems :-)  I needed the hidden max_file_size bit

Glad to hear it, and sorry it took me so long to get here.  There's that
other thread on the PHP list... *sigh*


% in the form.  But i'm also going to look at all your other suggestions

Yep.  I was going to suggest that you need

  post_max_size
  upload_max_filesize

and perhaps

  memory_limit
  max_input_time

bumped up from the defaults.  A good way to check this sort of thing is
to look at phpinfo() output and see what could be keeping you back.  In
my case, I didn't have _filesize and so I could watch the files spool up
in /var/tmp and then suddenly disappear even before the upload finished!


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP-DB] Re: send email

2003-11-25 Thread Kim Steinhaug
Well this shouldnt be any problem. I suspect you dont
know how to set up the email routine since your asking.

All you need to do is insert a sendmail script together with the
update of the mySQL database. You could use PHPs internal
functions for this, but Ill recommend you using PHPmailer which
is heavily documentet with tons of examples on how to use.

The PHPmailer is located at sourceforge and you should find it
right away. It has to be the most elegant way I know of sending
emails from PHP scripts.

And as a bonus, the PHPmailer is under active development so
you will most likely never run into problems using it, :)

-- 
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---


Redhat [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have created a simple form that dumps input information into a mysql
 database.  The person that I created it for said it would be nice if it
 would also notify him by email that an entry was added to the database.
 I have no idea where to begin with that - any ideas?
 thanks,
 DF

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



Re: [PHP-DB] Re: send email

2003-11-25 Thread howard gramer
I am in the same boat,
( I posted a couple of days ago Subject: Re: [PHP-DB] Send formmail data to 
Email and Database ), not knowing where to put the Mail() into my own code.  
I am working on it but no success yet.

But, my real question in this topic; with formmail.pl using Sendmail your 
able to use recipients_alias = [EMAIL PROTECTED] inside of the 
FormMail.conf file.  So this means you can hide the email address in the 
configuration file without it being seen in the page source.

How do you accomplish the same with Mail()? i.e. hiding the email

howard grämer
 New York City
  [EMAIL PROTECTED]

From: Kim Steinhaug [EMAIL PROTECTED]
Reply-To: Kim Steinhaug [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: send email
Date: Tue, 25 Nov 2003 19:57:44 +0100
Well this shouldnt be any problem. I suspect you dont
know how to set up the email routine since your asking.
All you need to do is insert a sendmail script together with the
update of the mySQL database. You could use PHPs internal
functions for this, but Ill recommend you using PHPmailer which
is heavily documentet with tons of examples on how to use.
The PHPmailer is located at sourceforge and you should find it
right away. It has to be the most elegant way I know of sending
emails from PHP scripts.
And as a bonus, the PHPmailer is under active development so
you will most likely never run into problems using it, :)
--
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---
Redhat [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have created a simple form that dumps input information into a mysql
 database.  The person that I created it for said it would be nice if it
 would also notify him by email that an entry was added to the database.
 I have no idea where to begin with that - any ideas?
 thanks,
 DF
_
online games and music with a high-speed Internet connection!  Prices start 
at less than $1 a day average.  https://broadband.msn.com (Prices may vary 
by service area.)

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


Re: [PHP-DB] Array question

2003-11-25 Thread CPT John W. Holmes
From: ShortStay [EMAIL PROTECTED]

 How do you delete a value and key from an array?  I know the value.

You need to know the key.

unset($Array[$key]);

There are various array functions that'll find the key for you if you know
the value.

 Is it OK to post array questions to the db list?

Not really... use php-general

---John Holmes...

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



RE: [PHP-DB] Re: send email

2003-11-25 Thread Jack van Zanen
Hi


my example earlier does not show the email address in  the source of the
displayed web page.
It is in the source code, but you can change that to be put in a config file
and include this file in the script.


Jack

-Original Message-
From: howard gramer [mailto:[EMAIL PROTECTED]
Sent: dinsdag 25 november 2003 21:09
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: send email


I am in the same boat,
( I posted a couple of days ago Subject: Re: [PHP-DB] Send formmail data to
Email and Database ), not knowing where to put the Mail() into my own code.
I am working on it but no success yet.

But, my real question in this topic; with formmail.pl using Sendmail your
able to use recipients_alias = [EMAIL PROTECTED] inside of the
FormMail.conf file.  So this means you can hide the email address in the
configuration file without it being seen in the page source.

How do you accomplish the same with Mail()? i.e. hiding the email


howard grämer
  New York City
   [EMAIL PROTECTED]


From: Kim Steinhaug [EMAIL PROTECTED]
Reply-To: Kim Steinhaug [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: send email
Date: Tue, 25 Nov 2003 19:57:44 +0100

Well this shouldnt be any problem. I suspect you dont
know how to set up the email routine since your asking.

All you need to do is insert a sendmail script together with the
update of the mySQL database. You could use PHPs internal
functions for this, but Ill recommend you using PHPmailer which
is heavily documentet with tons of examples on how to use.

The PHPmailer is located at sourceforge and you should find it
right away. It has to be the most elegant way I know of sending
emails from PHP scripts.

And as a bonus, the PHPmailer is under active development so
you will most likely never run into problems using it, :)

--
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---


Redhat [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  I have created a simple form that dumps input information into a mysql
  database.  The person that I created it for said it would be nice if it
  would also notify him by email that an entry was added to the database.
  I have no idea where to begin with that - any ideas?
  thanks,
  DF

_
online games and music with a high-speed Internet connection!  Prices start
at less than $1 a day average.  https://broadband.msn.com (Prices may vary
by service area.)

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

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



[PHP-DB] MySql backup

2003-11-25 Thread Robin Kopetzky
Question - if I stop MySql using WinMySqladmin on NT4.0, will I be able to
completely backup the data directory or do I need to do something else? This
is a commercial application that I need to backup, so it's mighty darned
important.

Any help is appreciated.

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

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



Re: [PHP-DB] MySql backup

2003-11-25 Thread John W. Holmes
Robin Kopetzky wrote:

Question - if I stop MySql using WinMySqladmin on NT4.0, will I be able to
completely backup the data directory or do I need to do something else? This
is a commercial application that I need to backup, so it's mighty darned
important.
I don't think PHP can stop MySQL... oh.. I see what you want... ;)

Yes. Stopping MySQL will allow you to back up or copy the data directories.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


[PHP-DB] LIKE % command

2003-11-25 Thread Chris Payne
Hi there everyone,

I'm doing a search in my DB using LIKE '%$word%' which works great, but it's not case 
sensitive, so if I search for bike it WON'T find BIKE, i'm using PHP and MySQL.

Probably something very obvious LOL it's just a basic select using LIKE.

Chris

[PHP-DB] Selecting date/time from an Access database

2003-11-25 Thread Metin Kale
Hello all..

I've been tasked to retrieve info from an Access database and I've been 
successful in selecting data and displaying it.  But I do have a problem 
with DATE/TIME data.  When I run a query asking for TIME data, I get the 
value -1 returned.

?

$conn = new COM(ADODB.Connection) or die(lala);
$dsn = DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=FILENAME.mdb;
$conn-Open($dsn);
$rset=new COM(ADODB.Recordset);
$rs=new COM(ADODB.Command);
$rs-Activeconnection=$conn;
$rs-CommandText=SELECT tblBooking.ReservationID, tblBooking.DateBooking, 
tblRoom.Room, tblBooking.TimeeventStart, tblBooking.TimeBookingEnd
FROM tblRoom INNER JOIN tblBooking ON tblRoom.ID = tblBooking.RoomID ORDER 
BY tblbooking.reservationid ASC;

$rset=$rs-Execute;

$e= $rset-Fields(4);
$d= $rset-Fields(3);
$c= $rset-Fields(2);
$b= $rset-Fields(1);
$a= $rset-Fields(0);
?

Results:

$a: 6391
$b: 954568800
$b(formatted from the timestamp above): 4/1/2000
$c: 2D (Minnesota)
$d: -1
$e: -1
$a is the reservation ID
$b is the timestamp
$c is the room name
$d is the start time
$e is the end time
As you can see, both $d and $e are not the correct values.  I opened the 
Access database and checked the data and it returned the correct 
time.  I've never had this kind of problems with MySQL, but I have to use 
Access in this instance.  Has anyone seen this before?

MORE INFO:

PHP Version 4.0.6
Access 97
Thanks,
metin
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php