OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: php3 Digest 27 Feb 2000 06:00:01 -0000 Issue 1504
From: php3-digest-helplists.php.net
Date: Sun Feb 27 2000 - 00:00:01 CST


php3 Digest 27 Feb 2000 06:00:01 -0000 Issue 1504

Topics (messages 78506 through 78581):

News server interface to this list is down?
        78506 by: "Michael Simcich" <msimcichaccesstools.com>
        78567 by: Richard Lynch <rlynchignitionstate.com>

ImageGif() function not found
        78507 by: "David H. McDaniel" <davemcdfastpointcom.com>
        78564 by: Richard Lynch <rlynchignitionstate.com>

Works locally not on internet
        78508 by: CDitty <mailredhotsweeps.com>
        78565 by: Richard Lynch <rlynchignitionstate.com>

FW: [PHP3] Database question
        78509 by: "alain samoun" <alainsamoun.com>
        78526 by: Alexandre Maneu i Victòria <nexus.mansoftctv.es>
        78530 by: "alain samoun" <alainsamoun.com>

R: [PHP3] Help for a small script
        78510 by: "Henry F. Marquardt" <hankyerpso.net>

Cursors in Oracle
        78511 by: "Manuel Lemos" <mlemosacm.org>
        78542 by: Richard Lynch <rlynchignitionstate.com>
        78568 by: Richard Lynch <rlynchignitionstate.com>

help...
        78512 by: "Michael Geier" <mgeierhpd.acast.nova.edu>

Photo Album
        78513 by: "Onaje Johnston" <onajeworldnet.att.net>
        78517 by: Perry J. Blalock <perrybbadger1.net>
        78518 by: Perry J. Blalock <perrybbadger1.net>
        78519 by: Boaz Yahav <berbernetvision.net.il>

timestamps
        78514 by: Richard Lynch <rlynchignitionstate.com>
        78534 by: Zak Greant <zaknucleus.com>

Trying to save time....
        78515 by: Richard Lynch <rlynchignitionstate.com>

Sort an array of arrays on an array item?
        78516 by: Richard Lynch <rlynchignitionstate.com>

installing php3 for Apache on Win98 - need help
        78520 by: "moureu frederic" <frederic.moureufree.fr>
        78527 by: Alexandre Maneu i Victòria <nexus.mansoftctv.es>

Online Shooping Mall
        78521 by: "Wes Weems" <ubermanthegrid.net>
        78524 by: Michael Waples <mwapleswaples.net>

how to use strtok
        78522 by: "Figmo" <archiverdb.geocrawler.com>
        78540 by: Zak Greant <zaknucleus.com>
        78566 by: Richard Lynch <rlynchignitionstate.com>

Enable/Disable inputbox
        78523 by: "Lennart Pedersen" <archiverdb.geocrawler.com>
        78570 by: Richard Lynch <rlynchignitionstate.com>

query returns correct data, but with warnings
        78525 by: curt <curtpdxinetarena.com>
        78572 by: Richard Lynch <rlynchignitionstate.com>

PHP3 Bug
        78528 by: Oliver Kurz <ojkurzgmx.de>
        78529 by: Oliver Kurz <ojkurzgmx.de>
        78569 by: Richard Lynch <rlynchignitionstate.com>

RH6.1 php query
        78531 by: Dave Reed <dreedcapital.edu>
        78539 by: <moebiusip-solutions.net>

.htm apache / linux
        78532 by: "erv" <webmasternetblooms.com>
        78535 by: KevinWaterson <hatemailoceania.net>
        78578 by: Richard Lynch <rlynchignitionstate.com>

Problem with variables
        78533 by: CDitty <mailredhotsweeps.com>
        78571 by: Richard Lynch <rlynchignitionstate.com>

Auto go back and reload!!
        78536 by: listsikrsna.com

mysql 3.23.11+PHP4B4PL1+APACHE 1.3.11
        78537 by: Home Chen <masterncc.com.tw>
        78538 by: sashamysql.com

STRTOK Modification Proposal / Was: How to use strtok
        78541 by: Zak Greant <zaknucleus.com>

Last page visited
        78543 by: Chris Cameron <chrisupnix.org>
        78548 by: "Opec Kemp" <okempozemail.com.au>
        78575 by: Richard Lynch <rlynchignitionstate.com>

A newbie needs help with redirection
        78544 by: Atanas Vassilev <atvassilevyahoo.com>
        78573 by: Richard Lynch <rlynchignitionstate.com>
        78581 by: Brian Clark <brianjais.ais-gwd.com>

Classified Ads in PHP?
        78545 by: Kit Plummer <designiosite.com>
        78554 by: Matt McClanahan <cardinaldodds.net>

Mime types
        78546 by: Jojo Wawa <leftball420yahoo.com>
        78576 by: Richard Lynch <rlynchignitionstate.com>

image magic
        78547 by: "Rossi Designs" <webmasterrossidesigns.net>

PHP or not PHP for an experienced developer
        78549 by: "Leonard A. Thomas III" <lthomaskent.edu>

[php-pt] Inserting data into Oracle
        78550 by: "Manuel Lemos" <mlemosacm.org>

Is PHP easier to learn than PERL???
        78551 by: Dean James <sacramonemediaone.net>
        78552 by: "Henry F. Marquardt" <hankyerpso.net>
        78563 by: "Howard Ha" <howardhtelus.net>
        78574 by: Richard Lynch <rlynchignitionstate.com>

echo TEXTAREA - a beginner's question
        78553 by: Ellen O'Neal <ellenonealyahoo.com>
        78558 by: "Rossi Designs" <webmasterrossidesigns.net>
        78559 by: Matt McClanahan <cardinaldodds.net>
        78577 by: Richard Lynch <rlynchignitionstate.com>

[ANN] CHIPHPUG (fka MPUG) Meeting
        78555 by: Richard Lynch <rlynchignitionstate.com>
        78560 by: "Henry F. Marquardt" <hankyerpso.net>

Output speed
        78556 by: Richard Lynch <rlynchignitionstate.com>

printing certain variables
        78557 by: Richard Lynch <rlynchignitionstate.com>

local time
        78561 by: Dave Reinhardt <DaveSeaPortNet.com>
        78579 by: Richard Lynch <rlynchignitionstate.com>

Since when is 142 <= 140.00
        78562 by: Dave Reinhardt <DaveSeaPortNet.com>
        78580 by: Richard Lynch <rlynchignitionstate.com>

Administrivia:

To subscribe to the digest, e-mail:
        php3-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php3-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php3lists.php.net

----------------------------------------------------------------------

attached mail follows:


Well, at least you're back up <g>.

BTW, I've posted twice here that the PHP install instructions don't work
with Win2k, and didn't get any sort of replies. My interest in PHP is going
to be very shout lived if [a] it won't run and [b] the peer support is this
faint. Is there any place to tap into PHP smarties? I've tried
phpbuilder.com, and there at least I met some others that were likewise
stuck, but no solution providers.

Thanks for the news services though!

Michael Simcich
AccessTools

-----Original Message-----
From: Tin Le [mailto:tinnetimages.com]
Sent: Saturday, February 26, 2000 8:47 AM
To: Michael Simcich
Cc: php3lists.php.net
Subject: Re: [PHP3] News server interface to this list is down?

The news server is accessible again. Our new office is currently on much
slower connection than at our old one, so you may experienced congestion.
We have more lines on order, but our ISP(PBI) is very slow, sigh.

Tin Le

----
Net Images - Premier Web Presence Provider   http://www.netimages.com/~tin
Internet Security and Firewall Consulting
Tin Le - tinnetimages.com

On Fri, 25 Feb 2000, Tin Le wrote:

> Sorry, we are moving our office to new location. The news server will be > down until late Saturday or Sunday at least. I had to shutdown all the > unneccessary servers. > > Tin Le > > ---- > Net Images - Premier Web Presence Provider http://www.netimages.com/~tin > Internet Security and Firewall Consulting > Tin Le - tinnetimages.com > > On Fri, 25 Feb 2000, Michael Simcich wrote: > > > Date: Fri, 25 Feb 2000 17:27:06 -0800 > > From: Michael Simcich <msimcichaccesstools.com> > > To: php3lists.php.net > > Subject: [PHP3] News server interface to this list is down? > > > > Is it just me or is the news interface to this list down? > > > > news.netimages.com > > > > doesn't hook up anymore for me (via cable Home). It worked fine until > > sometime on the 23rd. > > > > Michael Simcich > > AccessTools > > > > > > -- > > PHP 3 Mailing List <http://www.php.net/> > > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > > To contact the list administrators, e-mail: php-list-adminlists.php.net > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


At 10:17 AM 2/26/00 -0800, you wrote: >Well, at least you're back up <g>. > >BTW, I've posted twice here that the PHP install instructions don't work >with Win2k, and didn't get any sort of replies. My interest in PHP is going >to be very shout lived if [a] it won't run and [b] the peer support is this >faint. Is there any place to tap into PHP smarties? I've tried >phpbuilder.com, and there at least I met some others that were likewise >stuck, but no solution providers.

I'm gonna go out on a limb here and guess that you are one of the first to try PHP on W2K...

I realize that's not what you want to hear, and I wish I could offer more help.

I don't even know anybody else running W2K, much less trying to run PHP on it.

But other than repeating my suggestion of comparing the NT and 95 (and IIS and PWS and ...) install instructions to find similarities/differences and toying with it some more (which I'm sure you've already done more than I can imagine), I just don't know what else to say...

There are several volunteers who have written instruction sets for NT versus 95 versus 98 and IIS versus PWS versus Apache (et al) and FAT32 versus NTFS and... I'm afraid I can't even enumerate them all, much less begin to guess which one[s] are going to come most close to Windows 2000, but I would have hoped that Microsoft wouldn't have changed things *that* much... OTOH, I guess there wouldn't be all these differing sets of directions laying around if Microsoft hadn't changed the whole ballgame each time...

It is unfortunate that you have found the peer support lacking: I have to say I've always found it top-notch.

I realize it's a bit of a pain, but if you could delineate in each post which instructions you are using, and what parts, if any, are simply not translating to what you see or describe the problem (yet again), it might get more useful answers, particularly as people let the question percolate. I know you posted all that the first time, but seeing another post from you that only says "it's still not working" is just not likely to generate a useful answer...

PS Alter the Subject line. With 100+ messages a day, many readers kill any post whose subject is not "interesting" to them.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


When I try to use the ImageGif() function I Get the following Message:

Fatal error: Call to unsupported or undefined function imagegif() in f:\inetpub\wwwroot/default.php

Can anyone help me with this problem? David H. McDaniel (908) 305-9724 (Cell) (908) 561-8410 (Home) Text Page: send e-mail to 9083059724mobile.att.net


attached mail follows:


At 01:17 PM 2/26/00 -0500, you wrote: > When I try to use the ImageGif() function I Get the following Message: > Call to unsupported or undefined function imagegif() in >f:\inetpub\wwwroot/default.php Can anyone help me with this problem?

PHP didn't find GD when you compiled, so it's not builtin to PHP, *OR* it found the newer version of GD, which only supports PNG, so there is no imagegif, only imagepng.

To use imageGif, you must have GD 1.5 (1.3?) or less installed.

<?php phpinfo();?>

will tell you what PHP was compiled with.

Old versions of GD are floating around in 'Net archives, old Linux (eg Redhat) install disks, etc.

This inconvenience is a direct result of proprietary licensing problems, and PHP developers are not in a position to alter it.

More details about this issue are on the GD web-site, whose URL is something like boutrell.com, only probably not exactly that, and in the PHP mailing list archives.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Can anyone see anything wrong with this code? It works on my local system, but not on my site. Same codes on both and the form calling it is the same on both.

<? $i = 1; while ($i <= 80){ $choyce = "pick" . $i; $choice = $$choyce; if (IsSet($choice)){ $br = "<br>"; $choice = $choice . $br; } print "$choice"; $i++; $pick++; } ?>

Strange

CDitty

attached mail follows:


At 12:16 PM 2/26/00 -0600, you wrote: >Can anyone see anything wrong with this code? It works on my local system, >but not on my site. Same codes on both and the form calling it is the >same on both. > ><? >$i = 1; >while ($i <= 80){ >$choyce = "pick" . $i; >$choice = $$choyce; > if (IsSet($choice)){ > $br = "<br>"; > $choice = $choice . $br; > } > print "$choice"; > $i++; > $pick++; >} >?>

You'd have to define "not working" to get a definitive answer...

Guesses include:

o *REALLY* old PHP on the server that doesn't do variable variables. Unless my memory of when variable variables appeared is particularly bad right now, this would be *unconscionably* (sp?) old, to the point where I'd say "leave that ISP now".

o $pick++ is generating a warning message due to different error reporting settings in php.ini

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Alexandre: I think that, like me, a lot of people here are going to tell you to forget dbase and use MySQL instead. See: http://www.mysql.com/ It all depend of course of your application and how many hits at your database you expect to get. But your posting shows that you are a starter, so I'm pretty sure that MySQL will fulfill your need. Now you said that your server doesn't support SQL, SQL is just a language used by a lot of databases, your server will automatically support it if one of these databases is installed on it. So convince your server's people to install MySQL and you will be ready...

Message from Alain Samoun alainsamoun.com

-----Original Message----- From: Alexandre Maneu i Victòria [mailto:nexus.mansoftctv.es] Sent: Saturday, February 26, 2000 9:28 AM To: php3lists.php.net Subject: [PHP3] Database question

Hi.

First of all I want to say that I'm new to the list, so hello to everybody, and excuse me if I ask sth that has been answered before.

My server does not support SQL, but I want to implement a database in my web site. I intended to use dbase, but iitn the manual it says that is not recommended. Which is the best format I could use? dba perhaps?

Thank you very much. _________________________________ Àlex Maneu - mansoftctv.es ICQ: 12433233 Phones: +34932967792, +34619541839 PGP Public Key Available at http://www.amaneu.informaticos.org http://plataforma.hypermart.net http://www.mansoft.informaticos.org TARIFA PLANA YA! 3ª ala de combate de las fuerzas reVeldes contra el IMPERIO TIMOFONICO _________________________________

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


| Alexandre: | I think that, like me, a lot of people here are going to tell you to forget | dbase and use MySQL instead. See: http://www.mysql.com/ | It all depend of course of your application and how many hits at your | database you expect to get. But your posting shows that you are a starter, | so I'm pretty sure that MySQL will fulfill your need. | Now you said that your server doesn't support SQL, SQL is just a language | used by a lot of databases, your server will automatically support it if one | of these databases is installed on it. So convince your server's people to | install MySQL and you will be ready...

Thank you very much for your answer. However it is impossible for me to "convince" my server so that they install a SQL server, because there is a more expensive "option" where they include it, but I won't pay the money they ask if I can do it another way...

I tought of DBA or DBM, which seems easy and reliable, but I don't understand the way it works. As I said, I come from "dbase school" and I'm very used to the structure dbase databases have. In the manual they speak about "keys", and never about "fields", for example, and that's something essential to get the database working.

The kind of database I need doesn't have to be very powerful; if more than one user can read/write at the same time it's enough, and PHP's manual says DBA does it that way.

So, to summarize, I would be very interested in knowing (more or less) how DBA databases work.

Thank you very much again. PS: You can call me Alex if you want. We'll save some bytes :-) _________________________________ Àlex Maneu - nexus.mansoftctv.es

attached mail follows:


Alex: Well here is an extract of the manual about dBase: Begin quote ============ X. dBase functions These functions allow you to access records stored in dBase-format (dbf) databases. There is no support for indexes or memo fields. There is no support for locking, too. Two concurrent webserver processes modifying the same dBase file will very likely ruin your database. Unlike SQL databases, dBase "databases" cannot change the database definition afterwards. Once the file is created, the database definition is fixed. There are no indexes that speed searching or otherwise organize your data. dBase files are simple sequential files of fixed length records. Records are appended to the end of the file and delete records are kept until you call dbase_pack(). We recommend that you do not use dBase files as your production database. Choose any real SQL server instead; MySQL or Postgres are common choices with PHP. dBase support is here to allow you to import and export data to and from your web database, since the file format is commonly understood with Windows spreadsheets and organizers. Import and export of data is about all that dBase support is good for. End quote =====

Accordingly, I really think that if it is too costly to have MySQL on your ISP, you should change your ISP or even look for a free ISP that supports MySQL. Somebody here (based in the UK I think) has proposed a free space on his server that supported PHP and MySQL. Look in the archives http://www.php.net/mailsearch.php3 search for free or ISP or both ?? Good luck!

Message from Alain Samoun alainsamoun.com

-----Original Message----- From: Alexandre Maneu i Victòria [mailto:nexus.mansoftctv.es] Sent: Saturday, February 26, 2000 1:27 PM To: Php3 mailing list (E-mail) Subject: RE: [PHP3] FW: [PHP3] Database question

| Alexandre: | I think that, like me, a lot of people here are going to tell you to forget | dbase and use MySQL instead. See: http://www.mysql.com/ | It all depend of course of your application and how many hits at your | database you expect to get. But your posting shows that you are a starter, | so I'm pretty sure that MySQL will fulfill your need. | Now you said that your server doesn't support SQL, SQL is just a language | used by a lot of databases, your server will automatically support it if one | of these databases is installed on it. So convince your server's people to | install MySQL and you will be ready...

Thank you very much for your answer. However it is impossible for me to "convince" my server so that they install a SQL server, because there is a more expensive "option" where they include it, but I won't pay the money they ask if I can do it another way...

I tought of DBA or DBM, which seems easy and reliable, but I don't understand the way it works. As I said, I come from "dbase school" and I'm very used to the structure dbase databases have. In the manual they speak about "keys", and never about "fields", for example, and that's something essential to get the database working.

The kind of database I need doesn't have to be very powerful; if more than one user can read/write at the same time it's enough, and PHP's manual says DBA does it that way.

So, to summarize, I would be very interested in knowing (more or less) how DBA databases work.

Thank you very much again. PS: You can call me Alex if you want. We'll save some bytes :-) _________________________________ Àlex Maneu - nexus.mansoftctv.es

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


Sorry, I misunderstood, I thought you wanted to know how many hits of the pattern were in each row ... that's what count($hits) would do.

Why not just set up a counter in the 'if' statment.

<?php if(!$arrtext=file("form.txt")) { echo("Oops, can't get the file"); } else { $b=count($arrtext); $pipeval="\|"; $hits=0; for($i=0;$i<$b;$i++)

$riga=$arrtext[$i]; $pulite=split($pipeval,$riga); if(eregi($ricerca,$pulite[2])) { print "$pulite[0], $pulite[1]<br>"; $hits++; } } echo(count($hits));} ?>

That should do what you want now. I thought you wanted something different.

Hank

-----Original Message----- From: Avenuesaint di M.L. [mailto:avenuesaintavenuesaint.com] Sent: Saturday, February 26, 2000 11:14 AM To: Lista PHP-us/en Subject: [PHP3] R: [PHP3] Help for a small script

Hi, first of all, many thanks to Hank for all his suggestions....

Well, I've rewritten the script as you suggested and it works fine.... except for the purpose to count how many times the eregi function finds records.... Arghh... Using the third argument on my eregi function, I think, the script counts the number of rows that it has checked less one (?)... E.g. : in my database there are 11 records and if the query finds 7 records (and prints out 7 records correctly ), the $hits value says 10; if my query finds 2 records (and prints out 2 records correctly), the $hits value says always 10....

My main goal when I try to count the number of matches founded is to split the number of records for more pages.....

Here folllows the script as I've rewritten it:

<?php if(!$arrtext=file("form.txt")) { echo("Oops, can't get the file"); } else { $b=count($arrtext); $pipeval="\|"; for($i=0;$i<$b;$i++)

$riga=$arrtext[$i]; $pulite=split($pipeval,$riga); if(eregi($ricerca,$pulite[2],$hits)) { print "$pulite[0], $pulite[1]<br>"; } } echo(count($hits));} ?>

Umhhh, my confusion is growing....

Thanks in advance for any comments or suggestions..... Max

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


Hello Florian,

On 26-Feb-00 12:57:32, you wrote:

>>>statement, right? But only using procedural techniques. So the task is to >>>have the stored procedure create a subset of a SELECT statment. This can >>>only be done using a temporary table, I believe. >> >>That is a waste of performance and resources. If every time I need to >>fetch a subset of the rows of the result of a select query I need to create >>a temporary table, the advantage of doing it is gone because it would be >>better to fetch the whole result by skipping the first rows you are not >>interested in the client side.

>I agree this would be a wast of resources. >How do you like the following statment: >SELECT lname,sysid FROM patients WHERE ROWNUM<100 >MINUS >SELECT lname,sysid FROM patients WHERE ROWNUM<90

>The limitation here is, that you can not use ORDER BY.

Right, that wouldn't do. I need it to work with arbitrary SELECT queries. So you understand why, in case you don't know already, I have developed this DBMS independent package in PHP named Metabase to interface with SQL databases.

I have just added an ability to specify a range of rows to restrict the result set that is returned by the server for arbitrary SELECT queries. In MySQL I use the LIMIT clause. In PostgreSQL and Microsoft SQL server I use server side cursors. In Oracle I have to skip the unwanted initial rows on the client side but this is also a waste as it still leads to server-client comunication to transfer information that is not needed.

The ROWNUM solution is useless because it breaks with queries with the ORDER BY clause. Nested queries are not also the solution because when you have joins you may end up with columns with the same name and you wouldn't know how to refer to them in the outer query. I have an idea how to work arround this but it would require major query reparsing (client side overhead).

>Another alternative might be: >Open a cursor on the clientside (limiting the upper-bound with ROWNUM). Then

That would break with ORDER BY queries. Anyway, limiting the upper bound is not the greatest problem, since on the client side you only fetch the rows you want.

>call a PL/SQL Function to move to the first record which should be >displayed. Then on the clientside fetch all the rest rows. I guess this is >not very performant, but it might reduce the network traffic between >webserver >and oracle db as the data for moving to the first required row is not sent >to the webserver.

I know how to open a cursor and skip any amount of rows on the server side. I just don't know how to have the rows of interest to be selected from the cursor to be returned to the client side? Any ideas?

>However all this is not really satisfying to me. Maybe it would be good to >ask Oracle Corp about how to handle this.

Right, but how should we ask them? I am not a paying customer. I just got their Linux Developer CD.

Regards, Manuel Lemos

Web Programming Components using PHP Classes. Look at: acm.org">http://phpclasses.UpperDesign.com/?user=mlemosacm.org

--
E-mail: mlemosacm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--

attached mail follows:


At 03:57 PM 2/26/00 +0100, you wrote: >I agree this would be a wast of resources. >How do you like the following statment: >SELECT lname,sysid FROM patients WHERE ROWNUM<100 >MINUS >SELECT lname,sysid FROM patients WHERE ROWNUM<90

I dunno squat about Oracle and even SQL92, but this looks *really* ugly to my gut:

I'm thinking it almost *has* to do *two* selects, and then a Set Difference on them, unless there's some *serious* optimization going on... I suppose if ROWNUM < xxx is highly optimized, this wouldn't suck too badly, since we are talking a quick lookup of ~100 records, repeated twice, and then just maybe an ordered iteration rather than the bubble/quick/bucket sort/diff I dread, but, jeez, it still seems like the Wrong Answer (tm)

Surely there *has* to be some way of getting a cursor back and moving forward 90 like, say, PostgreSQL (free), in a multi-thousand dollar package...

I'm not saying I know the answer, and I'm not saying that you wouldn't be better off just coding a MINUS in SQL and going on with life under the 90/10 rule: I'm just saying my gut doesn't like this answer... But maybe it's too many doughnuts and a couple beers from the CHIPHPUG (CHif PUG) meeting... See forthcoming posts. :-)

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 04:49 PM 2/26/00 -0200, you wrote: >I know how to open a cursor and skip any amount of rows on the server side. >I just don't know how to have the rows of interest to be selected from the >cursor to be returned to the client side? Any ideas?

Ah!

Okay, I can only suggest an internal class/object to wrap up the cursor[s] into something that you maintain internally, and then when the end-user asks for rows 90 through 100, you move the cursor and get the 10 rows...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Please unsubscribe the following email addresses (I forget which one I used): mgeiernova.edu mgeierhpd.nova.edu mgeierhpd.acast.nova.edu

I will re-subscribe my new job (Sportsline.com)

=========================================================================== Michael Geier Information/Computer Technologist Nova Southeastern University HPD Library Voice: 954-262-1841 3200 South University Fort Lauderdale, Florida 33328 E-mail: mgeiernova.edu ===========================================================================

attached mail follows:


I tried to download this file but was unable to. I suggest that you add the file to http://www.werberdev.com so that it's available for everyone to use.

Tin Le <tinnetimages.com> said:

Hi,

Daevid sent his Photo Album code to me to make available. If you can't find it other places, you can try

ftp://ftp.le.org/php3/photo_album.tgz

Tin Le

attached mail follows:


I'd like to get this, but the ftp server seems to be inaccessable...sure the url is correct?

Thanks

> Hi,

> Daevid sent his Photo Album code to me to make available. If you can't > find it other places, you can try

> ftp://ftp.le.org/php3/photo_album.tgz

> Tin Le

> ---- > Net Images - Premier Web Presence Provider http://www.netimages.com/~tin > Internet Security and Firewall Consulting > Tin Le - tinnetimages.com

> On Fri, 25 Feb 2000, [iso-8859-1] Sandeep Hundal wrote:

>> Hi David, >> >> I'm very interested in your photo album for >> personal use. >> >> Is it possible you could send it to me as an >> attachement or point me o where yo might have >> posted it.... >> >> Thanks >> Sunny >> __________________________________________________ >> Do You Yahoo!? >> Talk to your friends online with Yahoo! Messenger. >> http://im.yahoo.com >> >> -- >> --------------------------------------------------------------------- >> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before >> posting. To request this thread, e-mail mysql-thread29129lists.mysql.com >> >> To unsubscribe, send a message to: >> <mysql-unsubscribe-tin=netimages.comlists.mysql.com> >>

> -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


Uhh... this url, http://werberdev.com, doesn't work either.

> I tried to download this file but was unable to. I suggest that you add > the > file to http://www.werberdev.com so that it's available for everyone to > use.

> Tin Le <tinnetimages.com> said:

> Hi,

> Daevid sent his Photo Album code to me to make available. If you can't > find it other places, you can try

> ftp://ftp.le.org/php3/photo_album.tgz

> Tin Le

> -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


thats http://www.weberdev.com and not http://werberdev.com

thanks

berber http://www.WeberDev.com

-----Original Message----- From: Perry J. Blalock [mailto:perrybbadger1.net] Sent: Saturday, February 26, 2000 9:00 PM To: onajeworldnet.att.net; php3lists.php.net Subject: RE: [PHP3] Re: Photo Album

Uhh... this url, http://werberdev.com, doesn't work either.

> I tried to download this file but was unable to. I suggest that you add > the > file to http://www.werberdev.com so that it's available for everyone to > use.

> Tin Le <tinnetimages.com> said:

> Hi,

> Daevid sent his Photo Album code to me to make available. If you can't > find it other places, you can try

> ftp://ftp.le.org/php3/photo_album.tgz

> Tin Le

> -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


At 07:50 AM 2/26/00 +1100, you wrote: >Zak Greant wrote: > >> $total_minutes = $row["AcctSessionTime"] / 60; >> >> # Use the round function to convert the number of minutes to an integer >> $total_minutes = ROUND( $minutes ); >> >> # Divide the number of minutes by 60 >> $hours = $total_minutes / 60; >> >> # Use the FLOOR function to discard the fractional remainder >> $hours = FLOOR( $hours ); >> >> # Use the modulus operator to return the number of minutes >> # Modulus acts like the division operator, except >> # it returns only the remainder (fractional amount) from the division >> operation

is it the linewrap on 'operation' ? Comment that out.

>> $minutes = $total_minutes % 60; >> >> # Use printf to print the number of hours and minutes >> PRINTF( '%2s:%02d', $hours, $minutes ); >> > >This helps alot in my understanding, however the above code returns and error at > >$minutes = $total_minutes % 60; > > >Kind regards > >Kevin > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net >

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 07:50 AM 2/26/00 +1100, you wrote:

>> $total_minutes = $row["AcctSessionTime"] / 60; >> >> # Use the round function to convert the number of minutes to an integer >> $total_minutes = ROUND( $minutes ); >> >> # Divide the number of minutes by 60 >> $hours = $total_minutes / 60; >> >> # Use the FLOOR function to discard the fractional remainder >> $hours = FLOOR( $hours ); >> >> # Use the modulus operator to return the number of minutes >> # Modulus acts like the division operator, except >> # it returns only the remainder (fractional amount) from the division >> operation >> $minutes = $total_minutes % 60; >> >> # Use printf to print the number of hours and minutes >> PRINTF( '%2s:%02d', $hours, $minutes ); >> > >This helps alot in my understanding, however the above code returns and error at > >$minutes = $total_minutes % 60;

Glad to help! However, as Richard Lynch pointed out in an earlier email, the error that you have encountered is not caused by the line of code : $minutes = $total_minutes % 60;

It is caused by the line above it: operation

Note that all of the other comments in the source code start with a #. The # tells the interpreter to ignore everything behind it until it encounters a newline.

Because that commented line wrapped when I sent it as email, part of the line that should have been commented out was not.

However, please note that there *is* a bug in the code

The line that reads $total_minutes = ROUND( $minutes ); should read $total_minutes = ROUND( $total_minutes );

For your reference:

Single line comments can also be started with a sequence of two forward slashes // This is a single line comment

Multi-line comments are started with a /* and ended with a */. /* This comment spans multiple lines The PHP interpreter will ignore anything in this block until a */ is encountered

Good Luck!

Zak Greant

attached mail follows:


At 02:02 AM 2/26/00 -0600, you wrote: >I have a form that has 80 (yes 80) check boxes. On the next page, I am >trying to save a little time and space by looping instead of typing 80 >lines of code. Anyhow, it must be the late hour as I cannot seem to get >this correct. Below is my code, does anyone have any suggestions? > >I have my forms named on the previous page as pick1, pick2, pick3......... > >$i = 1; >$pick = 1; >while ($i <= 80){ >$choice = $pick . $i;

$choice = 'pick' . $i; if (IsSet($$choice)){

//Note the two (2) dollar signs to convert pick1 into a variable variable.

It would be a whole lot easier if you just named your checkboxes pick[1]. Then PHP would build an array for you.

See the FAQ.

> if (IsSet($choice)){ > $br = "<br>"; > $choice = $choice . $br; > } > print "$choice"; > $i++; > $pick++; >} > >TIA > >CDitty > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net >

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


At 10:16 AM 2/26/00 +0100, you wrote:

>Does anyone know how to sort an array of arrays on an array item? > >Imagine the following: > >$testarray = array( array("john","johnson"), > array("jane","doe") > ); > >What I want to be able to do is sort $testarray on lastname so its order >would be: > >"jane","doe" >"john","johnson"

Something not unlike this might do it:

function element2cmp($array){ return strcmp($array[1]); }

$sorted = usort($testarray, 'element2cmp');

I think it's usort that lets you define the function...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


I have the same problem. What have you do to install PHP3 for Apache under Win98 ? thanks

"PhrAtoR" a écrit dans le message <7s671d$cqt$1www.php.net>... >I solved the problem by myself. thank you for your help. > >PhrAtoR >"PhrAtoR" <PhrAtoRgmx.de> schrieb in im Newsbeitrag: >7s3c3u$9u9$1www.php.net... >> Hi! >> >> What do I need to install PHP3 for Apache under Win98 and how do i do it? >> I downloaded some Win32 binaries, but I don't know how to use them. >> >> thanks >> PhrAtoR >> >> >> >> -- >> PHP 3 Mailing List <http://www.php.net/> >> To unsubscribe, send an empty message to php3-unsubscribelists.php.net >> To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >> To search the mailing list archive, go to: >http://www.php.net/mailsearch.php3 >> To contact the list administrators, e-mail: php-list-adminlists.php.net >> > > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


It's very simple.

1. You have to decompress everything you downloaded to a directory, for example c:\php3

2. Then, copy the file php3.ini-dist to your c:\windows directory and rename it to php3.ini.

3. Now, edit c:\windows\php3.ini. Search for "extension_dir" and after the "=" sign, write the directory you installed php3 to (ie, c:\php3)

4. Search the "dynamic extensions" section and uncomment the extensions you want to use (that is, erase the semi-colon).

5. Now you have to go to c:\apache\conf (or wherever you installed apache) and edit httpd.conf.

6. Search the "scriptalias" section, and add the following: ScriptAlias /php3/ "c:/php3" --> Remember you have to write normal slashes / to separate directories.

7. Search the "addtype" section and add: AddType application/x-httpd-php3-source .phps AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3 .php AddType application/x-httpd-php3 .phtml

8. Search the "action" section and add: Action application/x-httpd-php3 "/php3/php.exe"

9. (only if you want) change DirectoryIndex index.html and write DirectoryIndex index.php3

10. Change the line which starts with "servername" and write: ServerName yourComputerName where yourComputerName is the name you have in the "network" section of the control panel

11. Change the line which starts with "documentroot" and write: DocumentRoot c:/yourwebdir where c:/yourwebdir is the path to your web directory

I think there's nothing more. Enjoy! :-)

| I have the same problem. | What have you do to install PHP3 for Apache under Win98 ? | thanks

attached mail follows:


Ok, heres the question, I am currenly in the design stages of an online shopping mall type idea. I want to basically have people rent "stores" for a low price, that they manage completely by themselves minus creditcard stuff, (that will be through cybercash, or icverify or somethign) then they can add remove products(as many as they want) and be in almost complete control. I then would have a backend administration, or the actual mall portion of it. I dont want to re-program something thats already in existance.

If anyone has seen or heard of a php solution that is relatively cheap if not free, please reply, or e-mail me:

ubermanthegrid.net

attached mail follows:


www.youreshop.com might be what you are looking for - not cheap or free though - but if your renting out stores the cost shouldn't be too much.

> Wes Weems wrote: > > Ok, heres the question, I am currenly in the design stages of an > online shopping mall type idea. I want to basically have people rent > "stores" for a low price, that they manage completely by themselves > minus creditcard stuff, (that will be through cybercash, or icverify > or somethign) then they can add remove products(as many as they want) > and be in almost complete control. I then would have a backend > administration, or the actual mall portion of it. I dont want to > re-program something thats already in existance. > > If anyone has seen or heard of a php solution that is relatively cheap > if not free, please reply, or e-mail me: > > ubermanthegrid.net > >

attached mail follows:


This message was sent from Geocrawler.com by "Figmo" <figmofigmo.net> Be sure to reply to that address.

I'm trying to use the strtok function and I'm unsure how it could really *EVER* work.

Given the string...

$s = "ONE TWO,THREE"

{note there are 2 spaces after ONE"}

If I want to extract ONE TWO THREE as three separate tokens - how exactly would I do that? I've tried this:

$tok = strtok($s, " ,"); while ($tok) { # do something $tok = strtok($s, " ,); }

But this doesn't work. As soon as it hits the second space after ONE it stops because $tok is now an empty string ("").

I've done this before in C++, but using C the strtok function return NULL when it reaches the end of the string - different from "". So I can tell the difference between an empty token in the middle of the string and the actual end of the string.

How do you tell these apart in PHP3?

-tia

Geocrawler.com - The Knowledge Archive

attached mail follows:


At 11:44 AM 2/26/00 -0800, you wrote: >I'm trying to use the strtok function and I'm >unsure how it could really *EVER* work. > >Given the string... > >$s = "ONE TWO,THREE" > >{note there are 2 spaces after ONE"} > >If I want to extract ONE TWO THREE as three >separate tokens - how exactly would I do that? >I've tried this: > >$tok = strtok($s, " ,"); >while ($tok) { > # do something > $tok = strtok($s, " ,); >}

Oddly enough, I can run a modified version of your code: $s = "ONE TWO,THREE";

$tok = STRTOK( $s, ' ,' ); WHILE( $tok ) { PRINT "$tok\n"; $tok = STRTOK( ' ,' ); }

prints this result:

ONE TWO THREE

However, I have encountered the same problem before with other tokens:

This example only outputs the first token when I run it on my server:

$s = "a||b||c";

$tok = STRTOK( $s, '|' ); WHILE( STRLEN( $tok ) ) { PRINT "$tok\n"; $tok = STRTOK( '|' ); }

>But this doesn't work. As soon as it hits the >second space after ONE it stops because $tok is >now an empty string ("").

>I've done this before in C++, but using C the >strtok function return NULL when it reaches the >end of the string - different from "". So I can >tell the difference between an empty token in the >middle of the string and the actual end of the >string. > >How do you tell these apart in PHP3?

You could do something like this to get around this behavior

$str = "a b,c,,,,,e";

$tok = STRTOK( $str, ' ,' );

DO { PRINT "$tok\n";

/* Shorten $str by the number of characters returned by the last call to STRTOK Remove an extra character for the token that that was found Remove the characters from the front/left of the string */

$str = SUBSTR( $str, STRLEN($tok)+1, STRLEN($str) ); /* Call STRTOK again using the new, shortened version of $str */ $tok = STRTOK( $str, ' ,' ); # Keep doing it while there are still characters in $str } WHILE( STRLEN( $str ) );

Good Luck and Happy Coding!

Zak

attached mail follows:


At 11:44 AM 2/26/00 -0800, you wrote: >How do you tell these apart in PHP3?

In PHP3, you have to use the type information of the value, since data is value-typed, not variable-typed.

I forget what strtok returns when the string is done, but I'm guessing it would be 0...

Try checking what varType($tok) is instead of just $tok.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


This message was sent from Geocrawler.com by "Lennart Pedersen" <lennartevolution2000.dk> Be sure to reply to that address.

Hi list

Is there a way to enable and disable an input and dropsown box in PHP or is it a JS Q.

I need to in situation one haveing txt1 and txt2 enabled and txt3 and cbo1 disabled, but still visible. Just like when developing a standard applikation for eg. Windows.

Any help would be appriciated

best regards

Lennart Pedersen Denmark

Geocrawler.com - The Knowledge Archive

attached mail follows:


At 11:44 AM 2/26/00 -0800, you wrote: >This message was sent from Geocrawler.com by "Lennart Pedersen" <lennartevolution2000.dk> >Be sure to reply to that address. > >Hi list > >Is there a way to enable and disable an input and >dropsown box in PHP or is it a JS Q. > >I need to in situation one haveing txt1 and txt2 >enabled and txt3 and cbo1 disabled, but still >visible. Just like when developing a standard >applikation for eg. Windows.

It's actually just an HTML question, unless you want the "look" to change as the user picks other things on the form.

At any rate, the HTML attribute that works on some platforms is DISABLED, I think, as in:

<INPUT NAME=foo DISABLED> <SELECT NAME=bar DISABLED> <OPTION>1</OPTION> </SELECT>

Alas, it's not well-supported and can't be relied upon for anything critical: Nice to use for lucky users with "cool" browsers, I guess.

Presumably there's a JavaScript way to set the 'disabled' attribute of a form element dynamically, but I dunno what it might be.

If you *need* it to appear disabled, you can sort of fake it up by including an image instead of the form element, but it will then not look right on anything but the platform you target for the image, unless you detect their browser and deliver a custom image based on platform/version/etc, and that would be really, really lot of work just for the right "look"...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Hi all,

The query below returns the correct data, but I'm getting the two warnings below. Found a little stuff on mysql_field_name in the archives and in the manual for PHP and MySQL, but the line looks OK to me.

What am I doing wrong? And yes, I'm sorta new at this.

Thanks in advance for providing some clarity.

Curt

I'm using: Apache 1.3.11, MySQL 3.22.30, PHP3 1.0.12, Caldera 2.3 -----------

Results of query SELECT * FROM countries

Warning: Field 6 is invalid for MySQL result index 2 in /usr/local/apache/htdocs/mysal_test.php3 in line 33.

Warning: Field 7 is invalid for MySQL result index 2 in /usr/local/apache/htdocs/mysal_test.php3 in line 33. -----------

Table fields: +------+----------+-------+-------+------+-----+ | country | countryname | dateadd | datemod | datedel | status | +------+----------+-------+-------+------+-----+ CHAR(2) CHAR(20) TIMESTAMP CHAR(2) Pri key

line 20 <?php 21 if ($result == 0): 22 echo("<B>Error " . mysql_errno() . ": " . mysql_error() . "</B>"); 23 elseif (mysql_num_rows($result) == 0): 24 echo("<B>Query executed successfully!</B>"); 25 else: 26 ?> 27 28 <TABLE BORDER=1> 29 <THEAD> 30 <TR> 31 <?php 32 for ($i = 0; $i < mysql_num_rows($result); $i++) { 33 echo("<TH>" . mysql_field_name($result,$i) . "</TH>"); 34 } 35 ?>

attached mail follows:


At 11:19 AM 2/26/00 -0800, you wrote: >Hi all, > >The query below returns the correct data, but I'm getting the two >warnings >below. Found a little stuff on mysql_field_name in the archives >and in the manual for PHP and MySQL, but the line looks OK to me. > >What am I doing wrong? And yes, I'm sorta new at this. > >Warning: Field 6 is invalid for MySQL result index 2 >in /usr/local/apache/htdocs/mysal_test.php3 in line 33. > >Warning: Field 7 is invalid for MySQL result index 2 >in /usr/local/apache/htdocs/mysal_test.php3 in line 33. >----------- > >Table fields: >+------+----------+-------+-------+------+-----+ > | country | countryname | dateadd | datemod | datedel | status | >+------+----------+-------+-------+------+-----+

Your table has the 6 columns in it. They are numbered 0 through 5.

At the moment, it happens to have 8 rows in it, but presumably that will change as you add more countries.

At any rate, using the number of rows (8) to iterate through the column names, of which there are only 6, is where you went astray: The number of rows is independent of the number of columns.

I'm guessing that there's a mysql_num_columns() or something similar, or that there is a way to iterate through the columns when you don't know how many there are...

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Hello Doug Williams,

Freitag, 25. Februar 2000, you wrote:

> Does anyone know when the bug with strpos will be fixed or if there is a patch? The bug I refer to is . . .

> In the example below, the "...do something..." is never executed because $x is at the beginning of $line. According to the documentation, an integer is returned if the string is found and False is > returned if not. But in every single test I've run, the following example does NOT find $x in $line. That is, if the string you search for within another string is at the beginning of that other > string, its not found. A serious problem in my view. Anyway . . . does anyone know if a fix is available? I'm running a version of PHP3 download just a few days ago. Any help is appreciated. - > Doug

> $x = "someword"; > $line = "someword is right here";

> if (strpos($line,$x) <> False) > { > ... do something ... > }

Mhhhh I could be wrong but ...

strpos($line,$x) would return 0

And this is in my opinion correct.

The offset of $x in $line is 0 because your first character from $x is at position 0 in $line ...

I don't know how False is definded, but probably it would be also defined as 0. ( True probably !=0)

If you want to know that $x is in $line you have to proof the return value from strpos like this:

if (strpos($line,$x)>=0) { echo "Found it!"; } If strpos doesn't find your needle than it has to give back something like <0, cause 0 is a valid return value.

Your example: $x = "someword"; $line = "someword is right here"; if (($z=strpos($line,$x))>=0) { echo $z; }

I just tested some examples from this above with true an false. This won't work:

if (($z=strpos($line,$x))) { // It's correct ... cause return value is 0 ... 0 is not true ...

if (($z=strpos($line,$x))!=False) { //same as above ... return value is 0 ... is also not //true => false

The problem is the check from the return value ... because you forgot that 0 is a valid value for this function ... You have to know what values come back and are valid ...

Mit freundlichen Gruessen,

Oliver Kurz ------------------------------------- http://freddy.rz.fh-mannheim.de/~kurz mailto:ojkurzgmx.de -------------------------------------

attached mail follows:


Hello,

Samstag, 26. Februar 2000, you wrote:

[CUTCUTCUT]

> I just tested some examples from this above with true an false. This > won't work:

> if (($z=strpos($line,$x))) { > // It's correct ... cause return value is 0 ... 0 is not true ...

> if (($z=strpos($line,$x))!=False) { > //same as above ... return value is 0 ... is also not //true =>> false

> The problem is the check from the return value ... because you forgot > that 0 is a valid value for this function ... You have to know what > values come back and are valid ...

Sorry ... I just posted the message and than I saw the problem ...

$x = "zomeword"; $line = "someword is right here"; if (($z=strpos($line,$x))>=0) { // would be true ... cause return value is False and False is // something arround 0 or so echo $z; }

Why don't just give back -1 when nothing found ?

Mit freundlichen Gruessen,

Oliver Kurz ------------------------------------- http://freddy.rz.fh-mannheim.de/~kurz mailto:ojkurzgmx.de -------------------------------------

attached mail follows:


At 10:54 PM 2/26/00 +0100, you wrote: >Why don't just give back -1 when nothing found ?

It was deemed more important to be consistent with the underlying technology.

You need to check the TYPE of the data coming back to differentiate 0 from "".

Something not unlike:

while (getType($pos = strpos($line, $x)) == 'integer'){ //More data to process }

I probably got something wrong: Just realized my other post about using data type said varType. VBScript has rotted my brain. :-)

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


> From: <moebiusip-solutions.net> > > Hey Andrew, > I had php(3.0.12) working out of the box (or off of the CD). > > Harry Hoffman > Product Systems Specialist > Restaurants Unlimited Inc. > 206.634.3082 x. 270 > > On Sat, 26 Feb 2000, Andrew Harrowing wrote: > > > Has anyone managed to get php working on a RH6.1 box using > > only the software supplied on the RH6.1 cd? > > > > Excuse my ignorance, newbie & all that! ;¬)

I don't think it works quite out of the box - you need to uncomment some lines in /etc/httpd/conf/httpd.conf (and then restart apache)

I believe you need to uncomment the 6 lines below:

LoadModule php_module modules/mod_php.so LoadModule php3_module modules/libphp3.so AddModule mod_php.c AddModule mod_php3.c AddType application/x-httpd-php3 .php AddType application/x-httpd-php3-source .phps

HTH, Dave

attached mail follows:


Dave, You're absolutly correct. I forgot about that Regards,

Harry Hoffman Product Systems Specialist Restaurants Unlimited Inc. 206.634.3082 x. 270

On Sat, 26 Feb 2000, Dave Reed wrote:

> > From: <moebiusip-solutions.net> > > > > Hey Andrew, > > I had php(3.0.12) working out of the box (or off of the CD). > > > > Harry Hoffman > > Product Systems Specialist > > Restaurants Unlimited Inc. > > 206.634.3082 x. 270 > > > > On Sat, 26 Feb 2000, Andrew Harrowing wrote: > > > > > Has anyone managed to get php working on a RH6.1 box using > > > only the software supplied on the RH6.1 cd? > > > > > > Excuse my ignorance, newbie & all that! ;¬) > > > I don't think it works quite out of the box - you need to uncomment > some lines in /etc/httpd/conf/httpd.conf (and then restart apache) > > I believe you need to uncomment the 6 lines below: > > LoadModule php_module modules/mod_php.so > LoadModule php3_module modules/libphp3.so > AddModule mod_php.c > AddModule mod_php3.c > AddType application/x-httpd-php3 .php > AddType application/x-httpd-php3-source .phps > > HTH, > Dave > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


i know it is off the subject a bit, but....

we just moved to apache w/ linux red hat... none of my .htm pages are rendered in browser.. only .html works...

how do i set site wide permission for .htm

many thanks

attached mail follows:


erv wrote:

> i know it is off the subject a bit, but.... > > we just moved to apache w/ linux red hat...

Good move, .htm is a MS bastartization of .html keeping with the MS tradition of Three Letter Acronyms. (TLA's)

> > > how do i set site wide permission for .htm >

Use your favourite editor to open the file /etc/httpd/conf/srm.conf and add the following in the relevent section something like

AddHandler server-parsed .htm

also add index.htm to your DirectoryIndex

Then restart your httpd by /etc/rc.d/init.d/httpd restart ( no need to reboot or anything silly)

Kevin

attached mail follows:


At 05:37 PM 2/26/00 -0600, you wrote: >i know it is off the subject a bit, but.... > >we just moved to apache w/ linux red hat... none of my .htm pages are >rendered in browser.. only .html works... > >how do i set site wide permission for .htm

Not sure if you want PHP to be parsing them or...

Either way, it's a setting in httpd.conf

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


This will be an easy one for all you gurus out there. I need to take the results from below and then put them into the corresponding field. I hope that what needs to be accomplished is clear enough. I know what needs to happen, but I can't really explain it very well other than I can't get the values into the text boxes below. Can anyone help?

Thanks

CDitty

<? if ($process || !$submit){ $i = 1; $n = 1; while ($i <= 80){ $choyce = "pick" . $i; $choice = $$choyce; if (IsSet($choice)){ $br = "<br>"; $choice = $choice . $br; $guess = "guess_" . $n; print "$guess<br>"; $guess = $choice; print "$choice"; $n ++; } $i++; $pick++; } } $today = date( "Ymd His" );

?> <input type="text" name="ip" value="<? echo $REMOTE_ADDR; ?>"><br> <input type="text" name="enterdate" value="<? echo $today; ?>"><br> <input type="text" name="guess_1" value="<? echo $guess_1; ?>"><br> <input type="text" name="guess_2" value="<? echo $guess_2; ?>"><br> <input type="text" name="guess_3" value="<? echo $guess_3; ?>"><br> <input type="text" name="guess_4" value="<? echo $guess_4; ?>"><br> <input type="text" name="guess_5" value="<? echo $guess_5; ?>"><br>

attached mail follows:


At 05:50 PM 2/26/00 -0600, you wrote: >This will be an easy one for all you gurus out there. I need to take the >results from below and then put them into the corresponding field. I hope >that what needs to be accomplished is clear enough. I know what needs to >happen, but I can't really explain it very well other than I can't get the >values into the text boxes below. Can anyone help? > >Thanks > >CDitty > ><? >if ($process || !$submit){ > $i = 1; > $n = 1; > while ($i <= 80){ > $choyce = "pick" . $i; > $choice = $$choyce; > if (IsSet($choice)){ > $br = "<br>"; > $choice = $choice . $br; > $guess = "guess_" . $n; > print "$guess<br>"; > $guess = $choice;

I think:

$$guess = $choice;

Again, arrays would be way mo' betta.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


This is really a javascript/html question. It has nothing to with PHP3 but anyways. The reason the the page does not reload when it is pushed back is since it is 'cached'. So you should put some kind of reload code / no cache code on the page that it is going back to. You could do header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); That might fix your problem on the page you go back on... Mark Lo <marklokynetvigator.com> wrote: Hi everyone, > > for the function history.go(-1). > >if i use it on the body tag -----> <body onload="history.go(-1)"> > >the above function should tell the browser to go back to the previous >page and then reload that returned page again (like hitting the reload >button on the browser)....if i right....but I can't get the page to >reload after returned from the previous page. > >Anyone has any cues!!! > >Thank You > >Mark Lo > > >-- >PHP 3 Mailing List <http://www.php.net/> >To unsubscribe, send an empty message to php3-unsubscribelists.php.net >To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net >To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 >To contact the list administrators, e-mail: php-list-adminlists.php.net > > >

attached mail follows:


Hi.

I am install Mysql 3.23.11 + PHP 4bpl1 + Apache 1.3.11 in FreeBsd 3.3 but it's auto end at run sometime after. and load very high. I before use Mysql 3.23.8 + PHP4 b3+ Apache 1.3.9 is very nice. and load is low. why? please everybody tell me. thank you very much.

attached mail follows:


Home Chen wrote: > > Hi. > > I am install Mysql 3.23.11 + PHP 4bpl1 + Apache 1.3.11 in FreeBsd 3.3 > but it's auto end at run sometime after. and load very high. > I before use Mysql 3.23.8 + PHP4 b3+ Apache 1.3.9 is very nice. > and load is low. > why? please everybody tell me. thank you very much.

We should be the ones asking why :-) Can you do something to narrow the problem down? Enable logging on mysqld, see what queries you are running, run top, see who is eating up the CPU, then run your queries by hand, one at a time, and see how long they take. If mysqld segfaults, try to catch the query that caused it and verify the problem. Once you have gathered enough info about your system, post again.

-- 
Sasha Pachev

+------------------------------------------------------------------+ | TcX ____ __ _____ _____ ___ == mysqltcx.se | | /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sasha Pachev | | /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sashamysql.com | | /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Provo, Utah, USA | | /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ | | ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ | | /*/ \*\ Developers Team | +------------------------------------------------------------------+

attached mail follows:


Does anyone have bright ideas on a simple modification to STRTOK?

Could the value of the STRTOK string buffer be made available as a constant? Something like __STRTOK__. If this happened, then it would be pretty easy to get around the whole issue like this...

# Call STRTOK to initialize __STRTOK__ PRINT STRTOK( 'A||C|D||||H||J', '|' );

WHILE( STRLEN( __STRTOK__ ) ) PRINT STRTOK( '|' );

Ciao,

Zak

attached mail follows:


Is there a way to use php to get what page had the link to your current page without passing variables in the URL?

So if bob.phtml had a link to bob2.phtml, is there a way bob2.phtml can figure out that the person came from bob.phtml?

Sorry for the crummy analogue, Chris

attached mail follows:


Hi, Yes, you can fetch this vaule from a variable name $HTTP_REFERER

> -----Original Message----- > From: Chris Cameron [mailto:chrisupnix.org] > Sent: Sunday, February 27, 2000 1:05 PM > To: php3lists.php.net > Subject: [PHP3] Last page visited > > > Is there a way to use php to get what page had the link to your current > page without passing variables in the URL? > > So if bob.phtml had a link to bob2.phtml, is there a way bob2.phtml can > figure out that the person came from bob.phtml? > > Sorry for the crummy analogue, > Chris >

attached mail follows:


At 08:04 PM 2/26/00 -0700, you wrote: >So if bob.phtml had a link to bob2.phtml, is there a way bob2.phtml can >figure out that the person came from bob.phtml?

$HTTP_REFERER may have it, but is not reliable -- totally hackable by even a script-kiddie, and web-server configurable on/off.

Also beware that users actually bookmark stuff like bob2.phtml, so may have no referer at all.

If your application *really* depends on navigational context, you need to do user-tracking with packages such as PHPLIB http://phplib.netuse.de or some other similar code.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


I need to hide the real url-s for the links on my site - for example I want when someone points to a link it to read www.mydomain.com/myscript.php3 - but when that link is followed the script to open the right url. What should I put into myscript.php3? Is just this enough:

<? Header(Location: "www.myrealurl.com"); ?>

Or... should I provide a redirect status header first? I'm sure this has to be a very simple and short script, but I find it quite hard to figure out myself. Can someone show me everything that needs to be put in the myscript.php3 file?

Thanks in advance ;)

attached mail follows:


At 05:08 AM 2/27/00 +0200, you wrote: >I need to hide the real url-s for the links on my site - for example I >want when someone points to a link it to read >www.mydomain.com/myscript.php3 - but when that link is followed the >script to open the right url. What should I put into myscript.php3? Is >just this enough: > ><? >Header(Location: "www.myrealurl.com"); >?> > >Or... should I provide a redirect status header first?

I could be wrong, but I think that will be sufficient for a redirect status.

Either way, the end-user will see www.myrealurl.com, and that doesn't sound like what you want...

We'd need more info about what you want and why to help you out.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Atanas Vassilev said:

# I need to hide the real url-s for the links on my site - for example I # want when someone points to a link it to read # www.mydomain.com/myscript.php3 - but when that link is followed the # script to open the right url. What should I put into myscript.php3? Is # just this enough: # # <? # Header(Location: "www.myrealurl.com"); # ?> # # Or... should I provide a redirect status header first? # I'm sure this has to be a very simple and short script, but I find it # quite hard to figure out myself. Can someone show me everything that # needs to be put in the myscript.php3 file? # # Thanks in advance ;)

If you only want all the links to go to one place, then yes, this will do:

<? Header(Location: "www.myrealurl.com"); ?>

But that has to be sent before *anything* else. It'll have to be at the very top of the script.

If you want to make that script redirect to different places, you could just pass the real URL like so:

http://www.mydomain.com/myscript.php?redir=anotherpage.php

<? $url = 'http://www.mydomain.com/' . $redir; Header(Location: $url); // will redirect to http://www.mydomain.com/anotherpage.php ?>

Of course, you can make the value of $redir an absolute URL -- just leave off the concatenation going on between $url and $redir, and just use:

http://www.mydomain.com/myscript.php?redir=http://www.site.com/

<? Header(Location: $redir); // will redirect to http://www.site.com/ ?>

But if your intention is to just replace the actual URL with the URL of a script that just redirects for you -- AND, leave off the query string -- then you'd have to write a script for each page and each of the scripts would send a different header.

To me, that sounds like a lot of effort, and most people won't like it anyway (along the same lines as replacing my status bar with a JavaScript status message. Leave my status bar alone, damnit :-)).

If you just want to track where people are going when they leave the site, then that's a different story and you should have nothing to hide.

Or, you could just leech the contents of the site using fopen() (I think?), similar to Perl's LWP modules, but I ain't gettin' into that because I don't think that's fair to other site owners. I'd have a fit if someone where doing that with my site.. but then again, no one said that's what you wanted to do, and I'm just ramblin' now. :-)

Brian

attached mail follows:


Has anyone done or know of a classified ads system done in PHP3? I am getting ready to start a project, most likely reconfiguring the phphoo2 script. However, if anyone has a better idea let me know...

I need for the user to be able to upload up to three images, in a pre-specified file format (*.gif or *.jpg). Also, submission of an ad we require user registration/verification against a database.

Thanks in advance,

Kit Plummer designiosite.com

attached mail follows:


On Sun, 27 Feb 2000, Kit Plummer wrote:

> Has anyone done or know of a classified ads system done in PHP3? I am > getting ready to start a project, most likely reconfiguring the phphoo2 > script. However, if anyone has a better idea let me know... > > I need for the user to be able to upload up to three images, in a > pre-specified file format (*.gif or *.jpg). Also, submission of an ad we > require user registration/verification against a database.

Have you looked into phpAds? (http://phpwizard.net/phpAds/) If it doesn't already do what you need (I'm not sure it has file upload support) it would probably still be a good starting point for adding the features you're after.

Matt

attached mail follows:


I am setting up a web hosting server for a school project, on a Linux box w/ Apache and PHP3, and I have it basically all working fine, the users can join, manage files (delete,rename,upload,etc.), and other things, but I haven't figured out how to find the mime type of the files, I would like to know so I can add a simple Text editor, and allow for people to edit .html, .php3, and .txt files in the browser w/o having to edit on their machine and re-upload.

So I would like to know what is the easiest way to find out if the file I'm listing is one of those 3 types I mentioned. The listing should show the files the user has and gives extra options depending on the file type, only if I knew a good way to determined the file type. (And I've tried the filetype() function, and that's not what I want.)

Thanks a lot. Kevin __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com

attached mail follows:


At 07:16 PM 2/26/00 -0800, you wrote: >I am setting up a web hosting server for a school >project, on a Linux box w/ Apache and PHP3, and I have >it basically all working fine, the users can join, >manage files (delete,rename,upload,etc.), and other >things, but I haven't figured out how to find the mime >type of the files, I would like to know so I can add a >simple Text editor, and allow for people to edit >.html, .php3, and .txt files in the browser w/o having >to edit on their machine and re-upload. > >So I would like to know what is the easiest way to >find out if the file I'm listing is one of those 3 >types I mentioned. The listing should show the files >the user has and gives extra options depending on the >file type, only if I knew a good way to determined the >file type. (And I've tried the filetype() function, >and that's not what I want.)

The actual mime-type is configurable in httpd.conf, .htaccess, and in older Apache, srm.conf and access.conf (I think). Since this all can be done on a directory by directory (or even file by file) basis, it's not like there's a simple chart somewhere.

So, to the best of my knowledge, the only way to find out the mime-type *for* *sure*, is to open a socket to the server and ask for the HEAD and look at the Content-type... This is a bit excessive, but the only way to be sure.

That said, there is a nifty Un*x command called 'file' that can look at the file and tell you if it's text or not. Dunno if that's the same as filetype or not.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Where do you get image magic?

Rossi Designs (904) 226-8979 P.O. Box 1084, Holly Hill, Florida 32125-1084 http://rossidesigns.net

attached mail follows:


I would use PHP/MySql.

It is not that hard at all to learn. I learned it quickly.

Len

attached mail follows:


Viva Pedro,

No dia 24-Feb-00 13:38:21, escreveste:

>Hi everybody, >I'm having trouble inserting rather simple data into an Oracle db. >The data is being passed from a form with the names of the variables >being "t111" to "t112" etc... >They're all int's. >The code is inside a loop, and it works the first time around but the >second time it gives an error message. >Here's the code:

> for ($j=1;$j<6;$j++) > { > $m=1; > $val = "t".$i.$j.$m; // Getting the first column(classe) in the first >row > $vi=$$val; > $m++; > $val2= "t".$i.$j.$m; // Getting the second column in the first row > $vi2=$$val2; > $m=++; > $val3= "t".$i.$j.$m; // Getting the third column in the first row > $vi3=$$val3; > $m=++; > $val4= "t".$i.$j.$m; // Getting the fourth column in the first row > $vi4=$$val4; > $sel5="insert into classe_comp(idc,classe,indif,machos,femeas) >values($idc,$vi,$vi2,$vi3,$vi4)";

Insere aqui:

echo $sel5

e já verás o que está errado na sintaxe do comando SQL.

Um abraço, Manuel Lemos

Web Programming Components using PHP Classes. Look at: acm.org">http://phpclasses.UpperDesign.com/?user=mlemosacm.org

--
E-mail: mlemosacm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--

attached mail follows:


> Hello,

For those with experience with PERL,,, is PHP easier to learn??

Yes/No,,,in what ways etc...

thanks,

attached mail follows:


I had this conversation this evening ...

I view PHP as a web page language ... some disagree; most agree. I like Perl for general system scripting where shell scripting isn't enough.

The leaning curve to competency is shorter with php, especially if you've a C background.

I've found php much easier (higher productivity in my case) for cgi stuff, mostly because you intersperse your code with the regular old HTML... saves editor jumping around.

Many of the fun things from perl are available ... hashes = 'string indexed arrays', DBD:DBI stuff is natively supported.

The only thing that is 'odd' to me about php is the way it handles regex stuff as functions rather than language contructs, but you get over it.

just my .02

Hank

-----Original Message----- From: Dean James [mailto:sacramonemediaone.net] Sent: Saturday, February 26, 2000 9:54 PM To: Opec Kemp Cc: PHP List Subject: [PHP3] Is PHP easier to learn than PERL???

> Hello,

For those with experience with PERL,,, is PHP easier to learn??

Yes/No,,,in what ways etc...

thanks,

--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribelists.php.net
To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net
To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


I find both Perl and PHP to be about the same in terms of ease of use. Perl has a few quirks that I prefer over PHP, and vice versa.

What REALLY strikes me about PHP is that it can be embedded into HTML, and the fact that it has excellent error messages that really help you to pinpoint problems.

Besides, PHP is perfectly documented (http://www.php.net), and has many many built in functions that make it a really complete package.

Howard

> -----Original Message----- > From: Dean James [mailto:sacramonemediaone.net] > Sent: Saturday, February 26, 2000 7:54 PM > To: Opec Kemp > Cc: PHP List > Subject: [PHP3] Is PHP easier to learn than PERL??? > > > > Hello, > > For those with experience with PERL,,, is PHP easier to learn?? > > Yes/No,,,in what ways etc...

attached mail follows:


At 07:53 PM 2/26/00 -0800, you wrote: >> Hello, > >For those with experience with PERL,,, is PHP easier to learn?? > >Yes/No,,,in what ways etc...

PHP is easier to learn.

This is patently obvious because I have failed twice to learn Perl, and succeeded in learning PHP easily. QED :-)

Seriously, though, Perl has an awful lot of godawful syntax that can make it a pretty difficult language to learn from users who choose to use that syntax. There are some Perl scripts out there that avoid this gnarly syntax, but there's a lot that seem to revel in it.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


Hi, I have a form which has the following code:

... <form method="post" action="<? echo $PHP_SELF ?>" > ... <TEXTAREA wrap=virtual ROWS=15 COLS=50 name="problem" value="<? echo $problem ?>" ></TEXTAREA> ...

When the form is submitted, I simply want it to be able to echo back what has been entered by the user. I had no problem when the input type is text. How can I echo back a textarea such as above?

__________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com

attached mail follows:


<TEXTAREA wrap=virtual ROWS=15 COLS=50 name="problem"><? echo $problem ?> </TEXTAREA>

Rossi Designs (904) 226-8979 P.O. Box 1084, Holly Hill, Florida 32125-1084 http://rossidesigns.net ----- Original Message ----- From: Ellen O'Neal <ellenonealyahoo.com> To: <php3lists.php.net> Sent: Saturday, February 26, 2000 11:05 PM Subject: [PHP3] echo TEXTAREA - a beginner's question

| Hi, | I have a form which has the following code: | | ... | <form method="post" action="<? echo $PHP_SELF ?>" > | ... | <TEXTAREA wrap=virtual ROWS=15 COLS=50 name="problem" | value="<? echo $problem ?>" ></TEXTAREA> | ... | | When the form is submitted, I simply want it to be | able to echo back what has been entered by the user. I | had no problem when the input type is text. How can I | echo back a textarea such as above? | | | | | __________________________________________________ | Do You Yahoo!? | Talk to your friends online with Yahoo! Messenger. | http://im.yahoo.com | | -- | PHP 3 Mailing List <http://www.php.net/> | To unsubscribe, send an empty message to php3-unsubscribelists.php.net | To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net | To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 | To contact the list administrators, e-mail: php-list-adminlists.php.net | |

attached mail follows:


On Sat, 26 Feb 2000, Ellen O'Neal wrote:

> Hi, > I have a form which has the following code: > > ... > <form method="post" action="<? echo $PHP_SELF ?>" > > ... > <TEXTAREA wrap=virtual ROWS=15 COLS=50 name="problem" > value="<? echo $problem ?>" ></TEXTAREA> > ... > > When the form is submitted, I simply want it to be > able to echo back what has been entered by the user. I > had no problem when the input type is text. How can I > echo back a textarea such as above?

When the form is submited, you should have a $problem variable with the contents of the textarea. Incidentally, value= shouldn't work in a textarea.. The kosher way to display a textarea with contents is to put them inside the <textarea> </textarea> tags, e.g.,

<form method=post action="<? echo $PHP_SELF; ?>"> <textarea><? echo $problem; ?></textarea> <input type=submit></form>

Matt

attached mail follows:


At 08:05 PM 2/26/00 -0800, you wrote: >Hi, >I have a form which has the following code: > >... ><form method="post" action="<? echo $PHP_SELF ?>" > >... ><TEXTAREA wrap=virtual ROWS=15 COLS=50 name="problem" >value="<? echo $problem ?>" ></TEXTAREA> >... > >When the form is submitted, I simply want it to be >able to echo back what has been entered by the user. I >had no problem when the input type is text. How can I >echo back a textarea such as above?

The value doesn't go in VALUE=, it goes between the tags.

<TEXTAREA NAME=problem ROWS=15 COLS=50 WRAP=VIRTUAL><?php echo $problem;?></TEXTAREA>

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com                       http://EmphasisEntertainment.com
http://L-I-E.com                           http://JadeMaze.com
http://CatCatalani.com                     http://MGMH.com
http://VoodooKings.net                     http://UncommonGround.com

attached mail follows:


The first Chicago PHP User's Group, CHIPHPUG, [CHIF pug] meeting went very well!

It was originally announced as MPUG, but even *I* didn't really like that name: It was just convenient. :-)

I'll try to summarize the meeting here, but must confess to being too excited to take the best notes. Apologies in advance to anything/anyone misrepresented.

In attendence this meeting:

Ted Knudson tedkcyberlink.com Richard Lynch rlynchignitionstate.com Henry "Hank" Marquarot hankyerpso.net Dennis Nichols nicholstradingconnections.com Sten Turpin stennarnia.net

Next Meeting: Saturday, April 1st 1:30 pm Ignition State, 954 W Washington, Chicago o Time Change to accomodate Metra train schedules o Location is pending approval

Obviously, we decided to christen the group "CHIPHPUG" [CHIF pug]: o No confusion with, say, another 'P'-language like Perl/Python o Euphonius (more or less) o A little long for a semi-acronym, but so what? o The rest of the suggestions were pretty blase :-)

An amazing amount of organizational book-keeping was accomplished: Prioritization of Goals: o Recruitment/Promotion/Evangalism/Activism for PHP o Target Audiences o Chicagoland Linux/MySQL/Perl/etc User Groups o DIY developers desiring goal-based Solution, not "Religion" o Trade Magazines etc o IT Professionals willing to "comparison shop" (if comparison doesn't take too long) o Web-site, mailing list, further infrastructure o Focussed Topic Meetings Targeted o Higher-Level In-Depth Issues o Topical/Timely Issues o Q&A Session all meetings

Some forthcoming Topic ideas were discussed: o PHP4, new features and changes o MySQL o Tutorial Sessions before/after/during

Finally, we got around to talking about PHP itself and had some very good discussions about our favorite language. Attendees represented a very diverse background from "guy who knows Perl and heard about PHP", through users who just found PHP the right solution to their needs, to "experts".

We all agreed to focus on attracting more members. I'll be setting up some infrastructure with Rasmus, and Henry "Hank" Marquarot has very generously volunteered to help out with: Contacting local groups Building a few pages to get the site rolling

Whew! That's about it from me for now. *OFFLINE* feedback on whether future posts to full PHP mailing list should just be a URL (not feasible this time), or full-length minutes most welcome.

-- 
"TANSTAAFL"
We're looking for PHP/ASP hacker: http://ignitionstate.com/jobs/index.html
Need Work? Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
I will be offline from March 8th through April 2nd.
http://CHaTMusic.com