RE: [PHP-DB] Need help replacing one record

2004-01-09 Thread Humberto Silva

$result=mysql_query(UPDATE tablename SET userpwd='$newpass' WHERE
username='$name');


-Original Message-
From: Jeroen Wasteels [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 9 de Janeiro de 2004 18:24
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Need help replacing one record


Is there a way to change the information in one record of a database,
for example the password, without having to open the entire row, delete
it, and then add it with $row_data[name] and all and the $newpass as
changed password?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Need help replacing one record

2004-01-09 Thread Hutchins, Richard
If I understand your question correctly, an UPDATE query should be all you
need.

UPDATE tablename SET columname='value' WHERE someid='somenum';

I'm assuming you don't have the MySQL doc. Check mysql.com for the docs for
your version of the server.

Rich Hutchins, CIW Professional
Sr. Technical Writing Administrator
Getinge USA
1777 E. Henrietta Rd.
Rochester NY 14623
585-272-5072
www.getingeusa.com



 -Original Message-
 From: Jeroen Wasteels [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 09, 2004 1:24 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Need help replacing one record
 
 
 Is there a way to change the information in one record of a 
 database, for
 example the password, without having to open the entire row, 
 delete it, and
 then add it with $row_data[name] and all and the $newpass as changed
 password?
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php