$row->user_id;

From: Date: Wed, 17 Jan 2001 02:19:14 +0000
Subject: $row->user_id;
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34951@lists.php.net to get a copy of this message
Thanks! Tell me though, what does the following mean or should I ask how does it work? $row->user_id; Is it somehow relate to the following? $row["user_id"]; I tried to look for this in the manual but without any luck... perhaps I'm going blind ;) SED -----Original Message----- From: Benjamin Munoz [mailto:bmunoz@ivtweb.com] Sent: 17. janúar 2001 01:46 To: 'sed@sed.is'; php-general@lists.php.net Subject: RE: [PHP] MySQL - How to transfer a query resault into a variable? http://www.php.net/manual/en/function.mysql-fetch-object.php Modified example from the manual above... <?php mysql_connect ($host, $user, $password); $result = mysql_db_query ("database", "select * from table"); while ($row = mysql_fetch_object ($result)) { // save database fields into variables here $user_id = $row->user_id; $name = $row->name; // print them out if you want, or store them in an array to return if this is a function print ("<a href=user_details.php?user_id=$user_id>$name</a><br>\n"); } mysql_free_result ($result); ?> -Ben -----Original Message----- From: SED [mailto:sed@sed.is] Sent: Tuesday, January 16, 2001 5:21 PM To: php-general@lists.php.net Subject: [PHP] MySQL - How to transfer a query resault into a variable? Hi, Lets say I have columns e.g. | name | address | phone | I want to make a list of all the names and put the result into a HTML page where each name is a link. When the name is clicked (the link), it will open another HTML page with full information (name, address and phone). I know how to send the query to list the names (and into a formatted HTML-file), but I don't know how to put each name into a variable or a link for the next step. Can you point me to functions I should focus at or even a solution? Regards, Sumarlidi Einar Dadason SED - Graphic Design ------------------------------------------ Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: sed@sed.is Homepage: www.sed.is <- New Homepage! ------------------------------------------ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#34951) next »