Combining Fields

From: Date: Wed, 31 May 2006 19:40:48 +0000
Subject: Combining Fields
Groups: php.db 
Request: Send a blank email to php-db+get-41959@lists.php.net to get a copy of this message
Good Day! I am trying to use my limited knowledge to create a VERY simple process to display some of the information in my table, allow a particular record to be selected, then opened on a page with text boxes to edit the information, after which the UPDATE command will be used to update the database. That being said, I have a way that I think this will work, but I don't have a unique record number in my table for each of the entries. I have tried getting PHPMyAdmin to set this up, but I cannot seem to make it work. SO - I need to try to create that ID on the fly. I figured I could just combine the first and last names to make this ID, but I am not sure what the syntax should be. Here is the code I have dealing with defining the variables... Any help or thoughts would be splendid! while ($row = mysql_fetch_array($result)) { $id = $row['last_name'],$row['first_name']; $fname = $row['first_name']; $lname = $row['last_name']; $option_block .= "<option value=\"$id\">$lname, $fname</option>";

« previous php.db (#41959) next »