note 70132 added to function.mysql-query

From: Date: Wed, 04 Oct 2006 16:35:14 +0000
Subject: note 70132 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-118033@lists.php.net to get a copy of this message
this could be a nice way to print values from 2 tables with a foreign key. i have not yet tested correctly but it should work fine. $buscar = mysql_query("SELECT k.*, e.Clasificacion FROM cat_plan_k k, cat_equipo e WHERE Tipo='$tipo' AND k.ID_Eq=a.ID_Eq"); while ($row=mysql_fetch_array($buscar)) { $nombre = "e.Clasificacion"; $row[$nombre] = $Clasific; echo $row[$nombre].'convertido en '.$Clasific; } mysql_free_result($buscar); ---- Server IP: 148.206.80.9 Probable Submitter: 201.114.125.115 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-query.php Edit -- https://master.php.net/note/edit/70132 Del: integrated -- https://master.php.net/note/delete/70132/integrated Del: useless -- https://master.php.net/note/delete/70132/useless Del: bad code -- https://master.php.net/note/delete/70132/bad+code Del: spam -- https://master.php.net/note/delete/70132/spam Del: non-english -- https://master.php.net/note/delete/70132/non-english Del: in docs -- https://master.php.net/note/delete/70132/in+docs Del: other reasons-- https://master.php.net/note/delete/70132 Reject -- https://master.php.net/note/reject/70132 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118033) next »