php-windows Digest 5 Jun 2003 23:32:20 -0000 Issue 1763

Topics (messages 20200 through 20210):

Re: PHP, COM and Excel
        20200 by: Manuel Lemos
        20205 by: Luis Ferro

how do i skip primary keyz ????
        20201 by: toby z
        20202 by: Svensson, B.A.T. (HKG)
        20203 by: toby z
        20204 by: Cristian MARIN

Re: Best way to upgrade? How do you do it?
        20206 by: Rod Martin

back button
        20207 by: Harpreet

php4isapi.dll and header("Location: ...")
        20208 by: Eric Tonicello

imagettftext
        20209 by: Doug Dossett

Re: [PHP] php4isapi.dll and header("Location: ...")
        20210 by: John W. Holmes

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- Hello,

On 06/05/2003 04:55 AM, N A Morgan wrote:
Dear All,

Does anyone have any information on using COM in PHP to build Excel
spreadsheets?  I have a potential need and can't find any sites specific to
this task.

Depending on what you want to do, you may find here plenty of solutions, even some that do not require the use of COM objects:


http://www.phpclasses.org/search.html?words=excel&go_search=1


--


Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/


--- End Message ---
--- Begin Message --- I would suggest to read the info regarding using COM objects in PHP and then, search for using excel COM in VB6...
(the object members should be the same as in VB6 and work similary, apart from some synthax diferences between VB6 and PHP).


Cheers,
Luis Ferro

[EMAIL PROTECTED] wrote:

Dear All,

Does anyone have any information on using COM in PHP to build Excel
spreadsheets?  I have a potential need and can't find any sites specific to
this task.

Regards,

Neil Morgan MSc
Admin Computing, University of Brighton, 01273 643930
http://www.brighton.ac.uk/







--- End Message ---
--- Begin Message ---
hay guyz

im a bit stuck 
im restoring backup data and i need to fetch all fields of tables
except for the primary key
is there anyway to do that ?????
i ve been searchin fo a biultin function but couldnt find any

im sorry if this is off the list .... :$
thnx a mill

toby


__________________________________________________
Yahoo! Plus - For a better Internet experience
http://uk.promotions.yahoo.com/yplus/yoffer.html

--- End Message ---
--- Begin Message ---
That sounds to be a strange approach to restore an back up.
What precisely are you trying to achieve?

I assume you also are aware about that a backup mostly only saves
time points, and that you usually need to restore the latest full
back up and then add on incremental changes until the last time
point before you database did what ever nasty thing it did.

And by the way what kind of RDBMS are you trying to restore and
what kind of back up system are you using?

        //Anders

> -----Original Message-----
> From: toby z [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2003 1:50 PM
> To: php hlp list
> Subject: [PHP-WIN] how do i skip primary keyz ????
> 
> 
> hay guyz
> 
> im a bit stuck 
> im restoring backup data and i need to fetch all fields of tables
> except for the primary key
> is there anyway to do that ?????
> i ve been searchin fo a biultin function but couldnt find any
> 
> im sorry if this is off the list .... :$
> thnx a mill
> 
> toby
> 
> 
> __________________________________________________
> Yahoo! Plus - For a better Internet experience
> http://uk.promotions.yahoo.com/yplus/yoffer.html
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
good heavenz man
lemme breath first

ok

> That sounds to be a strange approach to restore an back up.
> What precisely are you trying to achieve?
> 
> I assume you also are aware about that a backup mostly only saves
> time points, and that you usually need to restore the latest full
> back up and then add on incremental changes until the last time
> point before you database did what ever nasty thing it did.

backup goes on a user's request
1. the code fetches up data from about 39 tables where new_backup = 0
which meanz the data iz new and has never been backed up before

2. after the data s fetched the code updates all new_backup = 1
through out the 39 tables

3. a file is saved on the local disk 
(this waz the clients requirement they want the data to be backedup
on local machines as the internet connections are horrid in most
parts of the country where they ll be running the applicaiton n its
to be restored by the administrator in the headoffice when he gets
the file stored on a disk or sumthin)

4. the administrator then can retore the backup on the server 
he ll have to run the script file brought in (the backup file)
creating a new dtabase on his server

4.i there are 9 prime key tables proj_unit(pu), union_council(uc),
supervizor(sup), village(vill), community-health-worker(chw),
family(fmly), mother(mo), child(chld),
other-family-memberz(othr-fmly)
4.i.a : fetch pu's from backup db
        compare against pu in server db
        if match found 
                get server db pu_ids
                replace backup-db pu_idz by servers
        else
                get max(pu_id) from server db
                inzert pu from backup db into server with its id==max(pu_id) from
server db

4.ii: loop 4.i for all 9 tables

5. now all the prime key tables have unique values
   so i can move in to inzert the rest of the data from backup-db to
server db
n this is the problem

all my primary keyz are auto-increments
if i inzert the data as i picked it up from the local machine along
with its primary-keyz i get an error for duplicate entries 

i guess the backup that i actually fetch otta be without these
primary keyz but then i need the primery keys of the 9 prime tables


what the fuck m i suppozed to do

im sorry fo soundin freeked out
but this thing is gonna b deployed in about 20 hours from now
:'(


can sum1 plz help

 
> And by the way what kind of RDBMS are you trying to restore and
> what kind of back up system are you using?

mysql :)


>       //Anders
> 
> > -----Original Message-----
> > From: toby z [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 05, 2003 1:50 PM
> > To: php hlp list
> > Subject: [PHP-WIN] how do i skip primary keyz ????
> > 
> > 
> > hay guyz
> > 
> > im a bit stuck 
> > im restoring backup data and i need to fetch all fields of tables
> > except for the primary key
> > is there anyway to do that ?????
> > i ve been searchin fo a biultin function but couldnt find any
> > 
> > im sorry if this is off the list .... :$
> > thnx a mill
> > 
> > toby
> > 
> > 
> > __________________________________________________
> > Yahoo! Plus - For a better Internet experience
> > http://uk.promotions.yahoo.com/yplus/yoffer.html
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  

__________________________________________________
Yahoo! Plus - For a better Internet experience
http://uk.promotions.yahoo.com/yplus/yoffer.html

--- End Message ---
--- Begin Message ---
If the primary key exist use an UPDATE tranzaction to rewrite all fields if not 
existing use INSERT:

$sql="SELECT id FROM table1 WHERE name='old_name'";
$result = mysql_query($sql);
if (There_is_no_id){

    $sql="INSERT INTO table1 VALUES (...)";

}else{

    $sql="UPDATE table1 SET ... WHERE id='$id_from_db'";
}



-- 
-------------------------------------------------
Cristian MARIN
InterAKT Online (www.interakt.ro)
+4021 411 2610 
[EMAIL PROTECTED]

  "Toby z" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
  good heavenz man
  lemme breath first

  ok

  > That sounds to be a strange approach to restore an back up.
  > What precisely are you trying to achieve?
  > 
  > I assume you also are aware about that a backup mostly only saves
  > time points, and that you usually need to restore the latest full
  > back up and then add on incremental changes until the last time
  > point before you database did what ever nasty thing it did.

  backup goes on a user's request
  1. the code fetches up data from about 39 tables where new_backup = 0
  which meanz the data iz new and has never been backed up before

  2. after the data s fetched the code updates all new_backup = 1
  through out the 39 tables

  3. a file is saved on the local disk 
  (this waz the clients requirement they want the data to be backedup
  on local machines as the internet connections are horrid in most
  parts of the country where they ll be running the applicaiton n its
  to be restored by the administrator in the headoffice when he gets
  the file stored on a disk or sumthin)

  4. the administrator then can retore the backup on the server 
  he ll have to run the script file brought in (the backup file)
  creating a new dtabase on his server

  4.i there are 9 prime key tables proj_unit(pu), union_council(uc),
  supervizor(sup), village(vill), community-health-worker(chw),
  family(fmly), mother(mo), child(chld),
  other-family-memberz(othr-fmly)
  4.i.a : fetch pu's from backup db
          compare against pu in server db
  if match found 
  get server db pu_ids
  replace backup-db pu_idz by servers
  else
  get max(pu_id) from server db
  inzert pu from backup db into server with its id==max(pu_id) from
  server db

  4.ii: loop 4.i for all 9 tables

  5. now all the prime key tables have unique values
     so i can move in to inzert the rest of the data from backup-db to
  server db
  n this is the problem

  all my primary keyz are auto-increments
  if i inzert the data as i picked it up from the local machine along
  with its primary-keyz i get an error for duplicate entries 

  i guess the backup that i actually fetch otta be without these
  primary keyz but then i need the primery keys of the 9 prime tables


  what the fuck m i suppozed to do

  im sorry fo soundin freeked out
  but this thing is gonna b deployed in about 20 hours from now
  :'(


  can sum1 plz help

   
  > And by the way what kind of RDBMS are you trying to restore and
  > what kind of back up system are you using?

  mysql :)


  > //Anders
  > 
  > > -----Original Message-----
  > > From: toby z [mailto:[EMAIL PROTECTED]
  > > Sent: Thursday, June 05, 2003 1:50 PM
  > > To: php hlp list
  > > Subject: [PHP-WIN] how do i skip primary keyz ????
  > > 
  > > 
  > > hay guyz
  > > 
  > > im a bit stuck 
  > > im restoring backup data and i need to fetch all fields of tables
  > > except for the primary key
  > > is there anyway to do that ?????
  > > i ve been searchin fo a biultin function but couldnt find any
  > > 
  > > im sorry if this is off the list .... :$
  > > thnx a mill
  > > 
  > > toby
  > > 
  > > 
  > > __________________________________________________
  > > Yahoo! Plus - For a better Internet experience
  > > http://uk.promotions.yahoo.com/yplus/yoffer.html
  > > 
  > > -- 
  > > PHP Windows Mailing List (http://www.php.net/)
  > > To unsubscribe, visit: http://www.php.net/unsub.php
  > > 
  > 
  > -- 
  > PHP Windows Mailing List (http://www.php.net/)
  > To unsubscribe, visit: http://www.php.net/unsub.php
  >  

  __________________________________________________
  Yahoo! Plus - For a better Internet experience
  http://uk.promotions.yahoo.com/yplus/yoffer.html

--- End Message ---
--- Begin Message --- That sounds good, but doesn't sound like what most PHP-WIN users use.

To all:

How do you move to a new point version? How do you update without losing PHP on your site during that time?

Is there a simple way you move your particular settings from one version to the next?

Thanks!


On Tuesday, June 3, 2003, at 01:54 AM, Per Lundberg wrote:


On Mon, 2003-06-02 at 23:18, Rod Martin wrote:
Is there a simple way to transfer
the changes I have made to the php.ini file into the new version? How
can I do this and minimize the chance of creating some long-term
downtime because I forgot to do something in the .ini that I (1)
figured out a year ago and (2) have subsequently forgotten.

Use a diff tool, and compare the php.ini shipped with the version of PHP
you are using (4.2.1). That way, you will see exactly what have been
changed.


Under Unix systems, you would run the command line program 'diff'.
Since you are running Windows, you likely don't have this elegant
program installed (unless you use Cygwin) but there is a graphical
Windows program that can do the same thing.  It is called WinMerge and
it can be found on http://winmerge.sourceforge.net

Hope this helps.  I use this program regularly on Windows and it works
like a charm.  It is also Open Source/free software, just like PHP
itself.
--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.nobolt.com
<signature.asc>


--- End Message ---
--- Begin Message ---
I am having problems using the back button in my web application I created
using PHP.

Whenever i press the back button or forward button to go to the previous
page i get the follwoing message:

Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a
security precaution, Internet Explorer does not automatically resubmit your
information for you.

To resubmit your information and view this Web page, click the Refresh
button.

How can I avoid having the above message and everyitme i press the back
button i get the previous page.

Help is appreciated.

Thanks,
Regards,
Harpreet


--- End Message ---
--- Begin Message ---
Hi !

Have somebody successed with the function <  header("Location: http://...";)
> using the php4isapi.dll ???

My code works well with PHP using the CGI php.exe, but impossible to make it
work with the ISAPI module !!!

Configuration:
-Windows 2000 server
- PHP 4.3.2

"php.ini" :
- output_buffering = on
- zlib.output_compression = on

Any idea ???
Other bugs with ISAPI module ???

Thanks for help !

Eric Tonicello



--- End Message ---
--- Begin Message ---
Hello all,

I'm using the following code to create images on the fly on a web site for page 
headers.  This works great for the most part, but a couple times now the text has 
started resizing for no apparent reason.  The first time it was just slightly wider 
than 
normal.  Most recently the text was giant.  I'm running PHP 4.3.1 on Win2k Server.  

Code:

        header("Content-type: image/jpeg");
        $im = imagecreate(200,14);
        $white = imagecolorallocate($im, 255,255,255);
        $green = imagecolorallocate($im, 51,102,0);
        $shadow = imagecolorallocate($im, 204,204,153);
        imagettftext($im, 12, 0, 1, 14, $shadow, "arialbd.ttf", $imgText);
        imagettftext($im, 12, 0, 0, 13, $green, "arialbd.ttf", $imgText);
        imagejpeg($im);
        imagedestroy($im);

If I restart IIS, the problem goes away.  Has anyone else seen this problem, know 
why this might be happening and/or have a fix?  

Thanks much,

Doug Dossett, LLC
www.dougdossett.com

--- End Message ---
--- Begin Message ---
> Have somebody successed with the function <  header("Location:
> http://...";)
> > using the php4isapi.dll ???
> 
> My code works well with PHP using the CGI php.exe, but impossible to
make
> it
> work with the ISAPI module !!!

Do you have exit(); after your header() call? I use header() all the
time with IIS and have never had an issue. 

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



--- End Message ---

Reply via email to