php-windows Digest 25 May 2007 10:38:28 -0000 Issue 3238
Topics (messages 27961 through 27970):
Re: LAST_INSERT_ID & LAST_UPDATE_ID
27961 by: Paul Menard
27962 by: Stut
27968 by: sam rumaizan
27969 by: Lester Caine
Warnings/Errors in PHP
27963 by: Gustav Wiberg
27964 by: chandar
27965 by: Gustav Wiberg
27966 by: Dale Attree
27967 by: Gustav Wiberg
27970 by: Stut
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Well what database? If mysql you can use the php function mysql_insert_id();
http://www.php.net/manual/en/function.mysql-insert-id.php
----- Original Message ----
From: sam rumaizan <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Thursday, May 24, 2007 4:26:42 PM
Subject: [PHP-WIN] LAST_INSERT_ID & LAST_UPDATE_ID
How can I select (retrieve) the last updated cell (field). Basically I need to
pull the new information only.
I'm using for updating my database:
UPDATE table SET column = CONCAT_WS ('column,'" . $column."') WHERE column=
value;
I need to select data:
SELECT * FROM table WHERE column=Whatever
I found LAST_INSERT_ID but i doesn't work
Choose the right car based on your needs. Check out Yahoo! Autos new
Car Finder
tool.http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg--
hot CTA = Yahoo! Autos new Car Finder tool
--- End Message ---
--- Begin Message ---
sam rumaizan wrote:
How can I select (retrieve) the last updated cell (field). Basically I need to
pull the new information only.
I'm using for updating my database:
UPDATE table SET column = CONCAT_WS ('column,'" . $column."') WHERE column= value;
I need to select data:
SELECT * FROM table WHERE column=Whatever
I found LAST_INSERT_ID but i doesn't work
LAST_INSERT_ID will not work because you're not inserting anything. The
clue, you see, is in the name.
Your best bet would be to add a timestamp/datetime field to the table
and include that in the update. Then you can use that field to get the
last row that was changed.
-Stut
--- End Message ---
--- Begin Message ---
What I want to do is:
1-user has 10 columns (fields).
2- User updated one of these fields using CONCAT_WS(adding new data to
previous data).
3- When user views any of his information he sees only the last updated part
of the data.
So, timestamp/datetime field is not going to work.
Stut <[EMAIL PROTECTED]> wrote:
sam rumaizan wrote:
> How can I select (retrieve) the last updated cell (field). Basically I need
> to pull the new information only.
>
> I'm using for updating my database:
>
> UPDATE table SET column = CONCAT_WS ('column,'" . $column."') WHERE column=
> value;
>
> I need to select data:
>
> SELECT * FROM table WHERE column=Whatever
>
> I found LAST_INSERT_ID but i doesn't work
LAST_INSERT_ID will not work because you're not inserting anything. The
clue, you see, is in the name.
Your best bet would be to add a timestamp/datetime field to the table
and include that in the update. Then you can use that field to get the
last row that was changed.
-Stut
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.
--- End Message ---
--- Begin Message ---
sam rumaizan wrote:
What I want to do is:
1-user has 10 columns (fields).
2- User updated one of these fields using CONCAT_WS(adding new data to
previous data).
3- When user views any of his information he sees only the last updated part of the data.
Not sure what you are trying to do here.
Once you have updated the record
UPDATE table SET column = CONCAT_WS ('column,'" . $column."')
WHERE column= value;
Then the record 'column= value' will be updated.
SELECT * FROM table WHERE column=VALUE
will return that record - except you seem to be changing the 'key' by which
you reference the record?
So you probably need
SELECT * FROM table WHERE column = CONCAT_WS ('column,'" . $column."') to get
that record.
The NORMAL method of working would be
UPDATE table SET column = CONCAT_WS ('column,'" . $column."')
WHERE KEY_COLUMN = value;
Then
SELECT * FROM table WHERE KEY_COLUMN = value;
will return the whole record that was updated.
If you want to see the changes, then you would need to do this before and
after the update and compare the fields.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird Foundation Inc. - http://www.firebirdsql.org/index.php
--- End Message ---
--- Begin Message ---
Hi there!
The server I'm connected to is not showing any warnings/error in PHP.
Instead it just displays a blank page. How can I do in PHP-script to show
errors/warning? I know this is possible, but I'm not able to find it for the
moment.
Best regards
/Gustav Wiberg
--- End Message ---
--- Begin Message ---
You can do this in PHP ini file.
Thanks/Chandar
Gustav Wiberg wrote:
Hi there!
The server I'm connected to is not showing any warnings/error in PHP.
Instead it just displays a blank page. How can I do in PHP-script to
show errors/warning? I know this is possible, but I'm not able to find
it for the moment.
Best regards
/Gustav Wiberg
--- End Message ---
--- Begin Message ---
Hi there!
I know that, but that wasn't my question...
I want to do it in the PHP-script...
Best regards
/Gustav Wiberg
----- Original Message -----
From: "chandar" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "PHP WindowsList" <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2007 9:12 AM
Subject: Re: [PHP-WIN] Warnings/Errors in PHP
You can do this in PHP ini file.
Thanks/Chandar
Gustav Wiberg wrote:
Hi there!
The server I'm connected to is not showing any warnings/error in PHP.
Instead it just displays a blank page. How can I do in PHP-script to
show errors/warning? I know this is possible, but I'm not able to find
it for the moment.
Best regards
/Gustav Wiberg
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Ini_set("display_errors",1);
Error_reporting(E_ALL ^ E_NOTICE);
-----Original Message-----
From: Gustav Wiberg [mailto:[EMAIL PROTECTED]
Sent: 25 May 2007 09:16 AM
To: chandar
Cc: PHP WindowsList
Subject: Re: [PHP-WIN] Warnings/Errors in PHP
Hi there!
I know that, but that wasn't my question...
I want to do it in the PHP-script...
Best regards
/Gustav Wiberg
----- Original Message -----
From: "chandar" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "PHP WindowsList" <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2007 9:12 AM
Subject: Re: [PHP-WIN] Warnings/Errors in PHP
> You can do this in PHP ini file.
> Thanks/Chandar
> Gustav Wiberg wrote:
>> Hi there!
>>
>> The server I'm connected to is not showing any warnings/error in PHP.
>> Instead it just displays a blank page. How can I do in PHP-script to
>> show errors/warning? I know this is possible, but I'm not able to find
>> it for the moment.
>>
>> Best regards
>> /Gustav Wiberg
>>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
***********************************************************************************************
The information contained in this e-mail is confidential and may be subject to
legal privilege.
Access to this e-mail by anyone other than the intended recipient is
unauthorised.
If you are not the intended recipient you must not use, copy, distribute or
disclose the e-mail or any part of its contents or take any action in reliance
on it. If you have received this e-mail in error, please notify us immediately
by e-mail ([EMAIL PROTECTED]) or telephone (+27 11 265 4200).
This message is free of all known viruses. It has been screened for viruses by
Blockmail.
***********************************************************************************************
--- End Message ---
--- Begin Message ---
Hi there!
Thanx a lot!!! :-)
Best regards
/Gustav Wiberg
----- Original Message -----
From: "Dale Attree" <[EMAIL PROTECTED]>
To: "'Gustav Wiberg'" <[EMAIL PROTECTED]>; "'chandar'" <[EMAIL PROTECTED]>
Cc: "'PHP WindowsList'" <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2007 9:27 AM
Subject: RE: [PHP-WIN] Warnings/Errors in PHP
Ini_set("display_errors",1);
Error_reporting(E_ALL ^ E_NOTICE);
-----Original Message-----
From: Gustav Wiberg [mailto:[EMAIL PROTECTED]
Sent: 25 May 2007 09:16 AM
To: chandar
Cc: PHP WindowsList
Subject: Re: [PHP-WIN] Warnings/Errors in PHP
Hi there!
I know that, but that wasn't my question...
I want to do it in the PHP-script...
Best regards
/Gustav Wiberg
----- Original Message -----
From: "chandar" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "PHP WindowsList" <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2007 9:12 AM
Subject: Re: [PHP-WIN] Warnings/Errors in PHP
You can do this in PHP ini file.
Thanks/Chandar
Gustav Wiberg wrote:
Hi there!
The server I'm connected to is not showing any warnings/error in PHP.
Instead it just displays a blank page. How can I do in PHP-script to
show errors/warning? I know this is possible, but I'm not able to find
it for the moment.
Best regards
/Gustav Wiberg
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
***********************************************************************************************
The information contained in this e-mail is confidential and may be
subject to legal privilege.
Access to this e-mail by anyone other than the intended recipient is
unauthorised.
If you are not the intended recipient you must not use, copy, distribute
or disclose the e-mail or any part of its contents or take any action in
reliance on it. If you have received this e-mail in error, please notify
us immediately by e-mail ([EMAIL PROTECTED]) or telephone
(+27 11 265 4200).
This message is free of all known viruses. It has been screened for
viruses by Blockmail.
***********************************************************************************************
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Dale Attree wrote:
Error_reporting(E_ALL ^ E_NOTICE);
Why oh why would you suggest this? Notices are telling you that
something is wrong. Do you ignore the light that indicates low fuel in
your car? If you do it'll keep working for a while, but it's a ticking
time bomb!!
-Stut
--- End Message ---