try this one.
just pass for $_value an array with your table fieldname as your key
function constructUpdate( $_tbl_name, $_where, $_values )
{
$valstr = '';
$firstval = false;
if (is_array($_values)) {
foreach( $_values as $key=>$val ) {
if ($
e='' AND last_name=''
Notice "SETWHERE".
Regards,
Dwight
> -Original Message-
> From: Grae Wolfe - PHP [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 23, 2006 8:16 PM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] Conditional updating...
>
Grae Wolfe - PHP wrote:
Thank you for the thought, however, I don't have a shell that I can run in,
hence, I have to rely on help from others.
get a GUI client then and use that...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Grae Wolfe - PHP wrote:
Thank you for the thought, however, I don't have a shell that I can run in,
hence, I have to rely on help from others.
something like phpmyadmin, phppgadmin will do.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php
Thank you for the thought, however, I don't have a shell that I can run in,
hence, I have to rely on help from others.
""JupiterHost.Net"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> Grae Wolfe - PHP wrote:
>> Sorry I have been out of touch... I thought I had this probl
Grae Wolfe - PHP wrote:
Sorry I have been out of touch... I thought I had this problem beat, but
I was wrong. I decided that the best thing to do was to filter the
variables as the $sql statement was being created. I tried using the
following code, and got a message back that it was inva
Sorry I have been out of touch... I thought I had this problem beat, but
I was wrong. I decided that the best thing to do was to filter the
variables as the $sql statement was being created. I tried using the
following code, and got a message back that it was invalid and my Query
couldn't
Perhaps I have misunderstood something here. But it seems to me that
anyone who just happens to put John Smith's name in could alter Mr.
Smith's data.
If users can update their own data, should you not have a log in process
to ensure that only the original user can update his data? Them once h
You could do a conditional update based on whether the form input is
empty/blank or not.
Use trim() on every input box entry, update that entry if there is any value
Make the query string based on non-empty inputs
trim(formput) != ''
//append to query string
Finally, your update query could lo
That was the first thing that I was going to do, but there is a concern
there for security of the data being input... This is a registration site,
and I don't want to provide information on "John Smith" to anyone who just
happens to put his name in.
""Alejandro Tesone"" <[EMAIL PROTECTED]> wr
Why don't you try populating the fields the user intends to modify
with the information you already have?
Alex T
On 6/17/06, Grae Wolfe - PHP <[EMAIL PROTECTED]> wrote:
Good day!
I have been working on this little "free" project for a while, and now I
have hit another major hiccup. Is there
Good day!
I have been working on this little "free" project for a while, and now I
have hit another major hiccup. Is there a simple way to only update fields
that have something in them?
The problem that I am having is that if someone fills out information and
submits it, it saves to the DB
12 matches
Mail list logo