OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 27 Jul 2004 09:00:24 -0000 Issue 2901

php-general-digest-helplists.php.net
Date: Tue Jul 27 2004 - 04:00:24 CDT


php-general Digest 27 Jul 2004 09:00:24 -0000 Issue 2901

Topics (messages 191914 through 191949):

Re: -> operator and :: (formal names?) (RESOLVED)
        191914 by: Mike Dichirico

Re: JavaScript conversion to PHP code...
        191915 by: Scott Fletcher
        191916 by: Matt M.
        191922 by: Curt Zirzow

Re: PHP editor that doesn't require installation
        191917 by: Justin Patrin
        191924 by: Tom Rogers

Re: Refer a class
        191918 by: Michael Ochs

Re: Problem with PEAR DB & MySQLi
        191919 by: Justin Patrin

Re: Is there a brian I can pick?
        191920 by: Robert Sossomon
        191921 by: Jason Davidson
        191923 by: Brian Dunning
        191934 by: Oliver John V. Tibi

Extra byte added to PDF streaming file
        191925 by: Scott Taylor
        191927 by: Larry E. Ullman
        191928 by: Curt Zirzow

PHP vs. Java
        191926 by: Ed Lazor
        191929 by: raditha dissanayake

php 5 DOM tutorials / examples?
        191930 by: Ed Lazor
        191938 by: Christian Stocker

Re: IMPORTANT: Please Verify Your Message]
        191931 by: Chris Martin
        191932 by: Curt Zirzow
        191933 by: Curt Zirzow

Re: URGENT: Space char in rewriterule
        191935 by: Robert Winter

issue a value on header, not working..
        191936 by: Louie Miranda
        191937 by: zareef ahmed
        191939 by: Justin Patrin
        191941 by: Louie Miranda

phpize missing files
        191940 by: Thijs Lensselink

Re: select * on all current?
        191942 by: Louie Miranda
        191943 by: Louie Miranda
        191944 by: Lester Caine

Mail System Error - Returned Mail
        191945 by: nick.loman.net

totally new to PHP
        191946 by: Paul Kain
        191947 by: Jason Barnett
        191948 by: Bruno Santos

Re: Retrieve The Last Record in a Table
        191949 by: Harlequin

Administrivia:

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

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

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

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

attached mail follows:


Michael and Curt,

Thank you very much with your time and promptness. You both have been very
helpful.

Kind regards,
Katie
----- Original Message -----
From: "Curt Zirzow" <php-generalzirzow.dyndns.org>
To: "php" <php-generallists.php.net>
Sent: Monday, July 26, 2004 1:12 PM
Subject: Re: [PHP] -> operator and :: (formal names?)

> * Thus wrote Katie Marquez:
> > Hi!
> >
> > I did a search of the PHP manual for these:
> >
> > -> and ::
> >
>
> as far as the :: is, its name (in php): The Paamayim Nekudotayim.
>
> Paamayim Nekudotayim would, at first, seem a strange choice for a
> double-colon. However, at the time of writing of Zend Engine 0.5
> (which powered PHP3), that is what Andi and Zeev decided to call
> it. It actually does mean double-colon - in Hebrew! As PHP has
> progressed with its development it has just never changed.
>
> php4:
> http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php
>
> php5 (comming soon):
> http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
>
> Curt
> --
> First, let me assure you that this is not one of those shady pyramid
schemes
> you've been hearing about. No, sir. Our model is the trapezoid!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


I think maybe this will do the trick..

--snip--
$char_code = strpos($char_set,(substr($input,$loop,1)));
--snip--

FletchSOD

"Scott Fletcher" <scottabcoa.com> wrote in message
news:20040726205131.14452.qmailpb1.pair.com...
> Hi, what is in your opinion is the best way to convert from JavaScript to
> PHP.... What I'm not entirely sure of is the
> "char_set.indexOf(input.charAt())"..... It look pretty tricky....
>
> --snip--
> var algorithm = 8;
>
> for (loop=0; loop<input.length; loop++)
> {
> //search char_set string for character and set char_code
variable...
> char_code = char_set.indexOf(input.charAt(loop));
>
> //opposite of encrypt algorithm goes here
> if (char_code - algorithm < 0) {
> space = algorithm - char_code;
> char_code = char_set.length - space;
> } else {
> char_code -= algorithm;
> }
>
> //set output variable in accordance to char_set
> output += char_set.charAt(char_code);
> }
> --snip--
>
> Thanks,
> FletchSOD

attached mail follows:


> --snip--
> $char_code = strpos($char_set,(substr($input,$loop,1)));
> --snip--

even a little shorter

$char_code = strpos($char_set,$input{$loop});

attached mail follows:


* Thus wrote Scott Fletcher:
> Hi, what is in your opinion is the best way to convert from JavaScript to
> PHP.... What I'm not entirely sure of is the
> "char_set.indexOf(input.charAt())"..... It look pretty tricky....
>

Sometimes a whole complete approach can be done:

> --snip--
> var algorithm = 8;
>

// shift the contents over and add the shifted to the end.
$trans = substr($char_set, $algorithm-1) .
             substr($chars_set, 0, $algorithm);

$output = strtr($input, $trans_set, $trans);

If your $input string is of a significant length this will be more
efficient with the cost of some memory (strlen($trans_set)x2).

Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!

attached mail follows:


On Mon, 26 Jul 2004 10:20:56 -0700, barophobia <barophobiagmail.com> wrote:
> On Sat, 24 Jul 2004 16:37:03 +0200, rush <piparush.avalon.hr> wrote:
>
> > scite, from the scintilla fame. TemplateTamer would also work fine if you
> > just copy the whole directory
>
> wow. that's a pretty awesome editor. too bad it can't connect to FTP
> sites. all my files are remote!
>
> anyone have a work around for this?
>

Edit locally and FTP manually.

Or get some kind of mounted FTP filesystem....doesn't Windows XP have
something like this built in....?

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


Hi,

Tuesday, July 27, 2004, 7:40:25 AM, you wrote:

JP> Edit locally and FTP manually.

JP> Or get some kind of mounted FTP filesystem....doesn't Windows XP have
JP> something like this built in....?

JP> --
JP> DB_DataObject_FormBuilder - The database at your fingertips
JP> http://pear.php.net/package/DB_DataObject_FormBuilder

JP> paperCrane --Justin Patrin--

I use a program called webdrive
(http://www.webdrive.com/index.php?pg=./products/webdrive/index)
that sets up the remote site as a
local drive which works really well.

--
regards,
Tom

attached mail follows:


> It's being copied somewhere. Maybe try this in the loadModule function:
> $this->module[$name] =& new $name($this);
>
> You don't need the & for $this as you've defined the function to send
> it by reference.

It doesn't work, either. But I think maybe the problem is somewhere else, it
seems that this bug just appears when a user sees the first page after the
login, so I think this part works correct. Going to look on other lines! :)
Thanks for help, all of you! :)

attached mail follows:


On Mon, 26 Jul 2004 12:18:37 -0500 (CDT), Rodolfo Gonzalez Gonzalez
<rodolfoequinoxe.g-networks.net> wrote:
> Hi,
>
> I'm trying to use PEAR's DB class with the new PHP 5 MySQLi support on
> MySQL 4.1.3, using this example from the PEAR's docs (with my parameters
> of course). I'm getting "DB unknown error" messages after the query. The
> same query from the mysql client works fine, there are no connection
> problems... anyone has tried PEAR with mysqli?.
>
> <?php
> // Create a valid DB object named $db
> // at the beginning of your program...
> require_once 'DB.php';
>
> $db =& DB::connect('mysqli://prueba:clave127.0.0.1:3306/mibase');
> if (DB::isError($db)) {
> die($db->getMessage());
> }
>
> // Proceed with a query...
> $res =& $db->query('SELECT * FROM users');
>
> // Always check that result is not an error
> if (DB::isError($res)) {
> die($res->getMessage());
> }
> ?>
>
> result:
>
> DB Error: unknown error
>

Echo $res->getUserInfo() as well. It has the real error.

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


It looks like you need to reset the $state variables each loop through
so that they are all empty, hence when you get to west virginia and
wisconsin they are but empties behind them

Heck, personally I'd just add another cell to the table and make it have
the full name in, then just use that column of data to populate the
system, since you are calling everything anyways, why work more when
another column can be used and have multiple uses??

My $.02

Robert

attached mail follows:


Hey, an alternative to your switch statement, is to have an
associative array with the full State names in it like this ...
$states = array('MI'=>'Michigan'); and so forth.
then just uses it in your html.. $states['$state'];

Jason

On Mon, 26 Jul 2004 15:28:11 -0400, Tom Ray [Lists]
<listsblazestudios.com> wrote:
> Hey all-
>
> I've run into a small bump in some code I'm writing for a membership
> database. The first thing that needs to be done is an index of all
> states in the US with members. The fun part is that the state
> information is stored as the abbreviation in the database (ie MI, WI)
> and the HTML page needs to display the full name of the State. I want to
> display the information in a four column table that kicks out as many
> rows as needed. Now in order to get the full name of the state, I'm
> running the state result through a switch statement. Actaully, it's
> working rather well expect for this little issue:
>
> Row 8: South Dakota Tennessee Texas Virgina
> Row 9: West Virgina Wisconsin Texas Virgina
>
> I need to kill that extra Texas and Virgina.....here's how I'm doing this:
>
> <table border=1>
> <?
> $query=mysql_query("SELECT DISTINCT state FROM members WHERE
> country='US' ORDER BY state ASC");
> while($q=mysql_fetch_array($query)) {
> $q1=mysql_fetch_array($query);
> $q2=mysql_fetch_array($query);
> $q3=mysql_fetch_array($query);
> $q4=mysql_fetch_array($query);
>
> (4 Switch statements here one for q1, q2, q3, q4)
> ?>
>
> <tr><td><?= $state1 ?></td><td><?= $state2 ?></td><td><?= $state3
> ?></td><td><?= $state4 ?></td></tr>
>
> <?
> }
> ?>
>
> Any thoughts, let me know if more information is needed.
>
> TIA.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


I'm a Brian, but you can't pick me unless you're a really hot chick.

- Brian

attached mail follows:


Brian, pardon the typo, but maybe he's looking for a brain. *chuckles*. :)

--

Running 'ojtibi' on '127.0.0.1' (BATCH_OPTIMISTIC mode).
"Live free() or die()."

"Brian Dunning" <brianbriandunning.com> wrote in message
news:629E8940-DF53-11D8-9E6D-000A95BD6AE4briandunning.com...
> I'm a Brian, but you can't pick me unless you're a really hot chick.
>
> - Brian

attached mail follows:


I'm using this code to stream a PDF file:

$file = $_SERVER['DOCUMENT_ROOT'] . "/file.pdf";
   
simple_streamfile($file);

function simple_streamfile($file)
{

    $fp = fopen($file, 'rb');
    // send the right headers
    header("Content-Type: application/pdf");
    header("Content-Length: " . filesize($file));
    // dump the file and stop the script
    fpassthru($fp);
    fclose($fp);
    exit;

}

It appears as though some readers (such as adobe acrobat) can read this
file fine yet others (such as the program gv in *NIX) cannot read it.

The reason for this is that somehow a hex 0A is added before the inital
%PDF-1.2 which marks the start of the PDF file causing some readers to
not recognize it as a PDF file. Is there anything in this code which
could possibly (always) cause an extra byte (0A) to be added before the
real start of the file? And no, the file is not corrupted (I've
already tried that) - this only happens when it goes through this
script, and not loaded directly as example.com/file.pdf.

Scott

attached mail follows:


> It appears as though some readers (such as adobe acrobat) can read
> this file fine yet others (such as the program gv in *NIX) cannot read
> it.
>
> The reason for this is that somehow a hex 0A is added before the
> inital %PDF-1.2 which marks the start of the PDF file causing some
> readers to not recognize it as a PDF file. Is there anything in this
> code which could possibly (always) cause an extra byte (0A) to be
> added before the real start of the file? And no, the file is not
> corrupted (I've already tried that) - this only happens when it goes
> through this script, and not loaded directly as example.com/file.pdf.

I've seen cases where extra buffer content gets added to the downloaded
file. The problem was fixed by deleting any existing buffer before
sending the file to the client. Not sure that will solve the problem
but it's worth a shot.

Larry

attached mail follows:


* Thus wrote Scott Taylor:
>
> $fp = fopen($file, 'rb');
> // send the right headers
> header("Content-Type: application/pdf");
> header("Content-Length: " . filesize($file));
> // dump the file and stop the script
> fpassthru($fp);
>
> ...
>
> The reason for this is that somehow a hex 0A is added before the inital
> %PDF-1.2 which marks the start of the PDF file causing some readers to
> not recognize it as a PDF file. Is there anything in this code which
> could possibly (always) cause an extra byte (0A) to be added before the
> real start of the file? And no, the file is not corrupted (I've
> already tried that) - this only happens when it goes through this
> script, and not loaded directly as example.com/file.pdf.

The reason this can happen is if you are including a file that
looks like this:
<?php
// content of includ file
?>

EOF

To find out where this is, turn error_reporting(E_ALL); and
ini_set('display_errors', true); you'll get a message telling you
that output was sent before the headers, and on what line the
output started on.

Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!

attached mail follows:


Any comments or opinions on pros and cons, especially in terms of stability,
security, and future upgradability?

 

I know this is probably one of those religious war topics, but I'd still
like your feedback.

 

-Ed

 

attached mail follows:


Ed Lazor wrote:

>Any comments or opinions on pros and cons, especially in terms of stability,
>security, and future upgradability?
>
>
This is a a religious war topic. Horses for course but in this list of
PHP fanatics you should expect only one answer - PHP is better for web
applications - no contest when it comes to mobiles or desktop applications.

>
>
>I know this is probably one of those religious war topics, but I'd still
>like your feedback.
>
>
>
>-Ed
>
>
>
>
>
>

--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

attached mail follows:


Any recommendations on books, links, tutorials, etc. for PHP 5's new DOM /
XML stuff?

 

Thanks,

 

Ed

 

attached mail follows:


On Mon, 26 Jul 2004 18:02:51 -0700, Ed Lazor <ed.lazord20news.com> wrote:
> Any recommendations on books, links, tutorials, etc. for PHP 5's new DOM /
> XML stuff?

Answered some hours ago here on this list

See http://news.php.net/php.general/191907

(there's certainly more ;) )

chregu

--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | chregubitflux.ch | gnupg-keyid 0x5CE1DECB

attached mail follows:


Justin Patrin wrote:
> On Mon, 26 Jul 2004 11:27:32 +0300, EE <eebjaili.com> wrote:
>
>>What is this? I got this message few times from php.net...
>>
>
>
> Well, that's weird....I've never seen that one.
>

Apparently they're from an annoying spam service that someone on this
list has subscribed to and not actually from the list itself.

They seem to have caused quite a disturbance on a few lists recently.
Safe to ignore, setup a filter, and delete.

- Chris

attached mail follows:


* Thus wrote Chris Martin:
> Justin Patrin wrote:
> >On Mon, 26 Jul 2004 11:27:32 +0300, EE <eebjaili.com> wrote:
> >
> >>What is this? I got this message few times from php.net...
> >>
> >
> >
> >Well, that's weird....I've never seen that one.
> >
>
> Apparently they're from an annoying spam service that someone on this
> list has subscribed to and not actually from the list itself.

At closer look at the message, it isn't from someone subscribed to
the list using that service, it is someone injecting the messages
to the person posting to the list.

Note the email of whom is claiming to be using the service, it is
php-gerneralphp, php does not use that service!

Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!

attached mail follows:


* Thus wrote EE:
> What is this? I got this message few times from php.net...

This isn't a message from php.net, it appears to be someone
attempting to harvest valid emails.

I would suggest to report this message including all the headers
but it doesn't appear they provide anyway to do such a thing. Not
to mention they appear to be some sort of marketing scheme as well.

Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!

attached mail follows:


It didn't work. Still the same problem.

Thanks

"Marek Kilimajer" <listskilimajer.net> escribió en el mensaje
news:410467A7.7050408kilimajer.net...
> Robert Winter wrote:
> > I have the following rewriterule:
> >
> > RewriteRule ^(([0-9]|[A-Z]|[a-z]|_)+)$ redirect.php?$1 [L]
> >
> > that transforms http://mysite.com/XXX to
http://mysite.com/redirect.php?XXX
> >
> > and I need to also include to space char, for example
> >
> > that transforms http://mysite.com/AB XX to
http://mysite.com/redirect.php?AB
> > XX
> >
> >
> > I didn't find a way to write the " " characters. I tested with
RewriteRule
> > ^(([0-9]|[A-Z]|[a-z]|_| )+)$ redirect.php?$1 [L] but didn't work.
> >
> > Thanks!
> > Rob
> >
>
> Did you try
>
> RewriteRule ^([0-9A-Za-z_%]+)$ redirect.php?$1
>
> ?

attached mail follows:


This outputs a filename on $catchresult, and im working on redirecting
it to that file via header. But when ever i run this the value of
$catchresult is not being pass to the header() on php.

$catchresult = $db_view->getOne($getfile);
header('Location: clients/FILES/$catchresult');

Hmm, it seems simple but, its really not working..

--
Louie Miranda
http://www.axishift.com

attached mail follows:


--- Louie Miranda <lmirandagmail.com> wrote:

> This outputs a filename on $catchresult, and im
> working on redirecting
> it to that file via header. But when ever i run this
> the value of
> $catchresult is not being pass to the header() on
> php.
>
> $catchresult = $db_view->getOne($getfile);
> header('Location: clients/FILES/$catchresult');
>
> Hmm, it seems simple but, its really not working..

Yes it is simple just change your single quotes to
double quotes. i.e.

 header("Location: clients/FILES/$catchresult");

zareef ahmed

>
> --
> Louie Miranda
> http://www.axishift.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

=====
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com

        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

attached mail follows:


On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda <lmirandagmail.com> wrote:
> This outputs a filename on $catchresult, and im working on redirecting
> it to that file via header. But when ever i run this the value of
> $catchresult is not being pass to the header() on php.
>
> $catchresult = $db_view->getOne($getfile);
> header('Location: clients/FILES/$catchresult');
>
> Hmm, it seems simple but, its really not working..
>

When using single quotes, variables aren't replaced by their content.
Using double quotes would fix it, but consider this alternative:

header('Location: clients/FILES/'.$catchresult);

Cleaner, more obvious that you're using a variable, will be
highlighted correctly by syntax highlighters, and, most important,
it's faster. :-)

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


ah ic, thanks. it now works fine.

thanks also for the tip! :)

On Mon, 26 Jul 2004 23:29:06 -0700, Justin Patrin <papercranegmail.com> wrote:
> On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda <lmirandagmail.com> wrote:
> > This outputs a filename on $catchresult, and im working on redirecting
> > it to that file via header. But when ever i run this the value of
> > $catchresult is not being pass to the header() on php.
> >
> > $catchresult = $db_view->getOne($getfile);
> > header('Location: clients/FILES/$catchresult');
> >
> > Hmm, it seems simple but, its really not working..
> >
>
> When using single quotes, variables aren't replaced by their content.
> Using double quotes would fix it, but consider this alternative:
>
> header('Location: clients/FILES/'.$catchresult);
>
> Cleaner, more obvious that you're using a variable, will be
> highlighted correctly by syntax highlighters, and, most important,
> it's faster. :-)
>
> --
> DB_DataObject_FormBuilder - The database at your fingertips
> http://pear.php.net/package/DB_DataObject_FormBuilder
>
> paperCrane --Justin Patrin--
>

--
Louie Miranda
http://www.axishift.com

attached mail follows:


Good day php people,

Hope somebody can help me out a bit.
I'm trying to compile 'apc' on my OpenBSd box.
The install file reads:

$ gunzip -c apc_x.y.tar.gz | tar xf -
$ cd apc_x.y
$ /usr/local/php/bin/phpize

But when i try to run phpize i get some errors:

/usr/local/bin/phpize
/usr/local/bin/phpize[48]: cd: /usr/local/lib/php/build - No such file or directory
/usr/local/bin/phpize[49]: cd: /usr/local/lib/php/build - No such file or directory
/usr/local/bin/phpize[53]: cannot open /usr/local/lib/php/build/phpize.m4: No such file or directory
aclocal: `configure.ac' or `configure.in' is required

I checked to see if /usr/local/lib/php/build exists but it doesn't.
Looks to me php didn't install the devel files. I searched some news groups
and it looks like the are more people with this problem. But i havn't
seen any answer.

$ ./configure --enable-apc
$ make
$ make install

Thijs Lensselink
Web Developer

Factotum Media B.V.
Postbus 335, 1200 AH Hilversum
Oosterengweg 44, 1212 CN Hilversum
Telefoon: 035 688 11 82
Fax: 035 688 11 17
E-mail: tlensselinkfactotummedia.nl
www.factotummedia.nl
"certamen inter mammosas tunicis madefactis vestitas"

attached mail follows:


ok, just removed the distinct syntax

On Mon, 26 Jul 2004 23:51:43 -0500, mos <mos99fastmail.fm> wrote:
> At 10:45 PM 7/26/2004, you wrote:
> >if I understand you correctly, this should do it.
> >
> >select distinct office, max(dateposted)
> >from table
> >group by office
>
>
> Just one more thing. You don't need "distinct" because you are already
> using "group by".
>
> Mike
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=lmirandagmail.com
>
>

--
Louie Miranda
http://www.axishift.com

attached mail follows:


now its working,

i was wondering if we can do max(dateposted) on update?

mysql> update datafiles set status = '1' where max(dateposted);
         ERROR 1111: Invalid use of group function

hmm? seems, not to be working at all.

On Tue, 27 Jul 2004 14:43:58 +0800, Louie Miranda <lmirandagmail.com> wrote:
> ok, just removed the distinct syntax
>
>
>
> On Mon, 26 Jul 2004 23:51:43 -0500, mos <mos99fastmail.fm> wrote:
> > At 10:45 PM 7/26/2004, you wrote:
> > >if I understand you correctly, this should do it.
> > >
> > >select distinct office, max(dateposted)
> > >from table
> > >group by office
> >
> >
> > Just one more thing. You don't need "distinct" because you are already
> > using "group by".
> >
> > Mike
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe: http://lists.mysql.com/mysql?unsub=lmirandagmail.com
> >
> >
>
>
> --
> Louie Miranda
> http://www.axishift.com
>

--
Louie Miranda
http://www.axishift.com

attached mail follows:


Louie Miranda wrote:

> now its working,
>
> i was wondering if we can do max(dateposted) on update?
>
> mysql> update datafiles set status = '1' where max(dateposted);
> ERROR 1111: Invalid use of group function

WHERE dateposted = max(dateposted);
Perhaps ( works in Firebird :) )

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services

attached mail follows:


The original message was included as attachment

attached mail follows:


I have never programmed anything

I know html and really want to know php

where is the best place to go for some really basic tutorials to start with ?

Thank in advance

attached mail follows:


phpfreaks.com and codewalkers.com

Or check the mailing list archives, others have been mentioned before.

attached mail follows:


Paul Kain wrote:

>I have never programmed anything
>
>I know html and really want to know php
>
>where is the best place to go for some really basic tutorials to start with ?
>
>Thank in advance
>
>
>
Hello.

There are a lots of tutorials around the net.

www.phpbuilder.com <--- Very nice site for developers
www.php.net <--- PHP official site. Look in the manual, every function
(or almost any) has a description and comments from people around the
globe with improvements and tips.

Since you never programmed before, i recomend you to buy some PHP
beginner books, cause always cover programing from the begining. but, if
you can affort it, buy some programing books, with no relation to any
programing language. It would be best for you to understande the basics
without knowing any programing language... almost of them starts with C
language, witch is very nice to start !

by the way, its nice for you to start programming with PHP. you will
love it !!

--
bvsantoshal.min-saude.pt
--
Divisao de Informatica
informaticahal.min-saude.pt
Tel: +351 272 000 155
Fax: +351 272 000 257

--
Hospital Amato Lusitano
Av. Pedro Alvares Cabral
6000-085 Castelo Branco
geralhal.min-saude.pt
Tel: +351 272 000 272
Fax: +351 272 000 257

attached mail follows:


Thanks for that Jason

Any suggestions on how I would retrieve the next to last entry...? The last
time prior to this session that the user logged in...?

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Jason Davidson" <jason.davidsongmail.com> wrote in message
news:6c925ae2040726112334d593c0mail.gmail.com...
> as mentioned already, use a column in the table to order the query and
> then use LIMIT to only to return one record. Best columns to use would
> be an auto_increment or a datetime field type.
>
> Jason
>
> On Mon, 26 Jul 2004 18:27:25 +0100, Harlequin
> <michael.masonarraspeople.co.uk> wrote:
> >
> >
> > I would like to retrieve the last entry in a login table and present
that to
> > a user so they can verify the date we have when they last logged in.
> >
> > Is this possible...?
> >
> > --
> > -----------------------------
> > Michael Mason
> > Arras People
> > www.arraspeople.co.uk
> > -----------------------------
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >