how would i do this ?

From: Date: Thu, 12 Jul 2001 07:52:43 +0000
Subject: how would i do this ?
Groups: php.general 
Request: Send a blank email to php-general+get-57556@lists.php.net to get a copy of this message
Hi I need to fill a variable a value (writers name) with the data coming from 2 different tables depending on the choice from the previosu page (add a new article or edit an old one). Is their an easier way to do this as the sql is rather ugly that I am using later as itis not clean in its choice giving extra records. if (isset($writer)) //for a new story $n = get_writer_name($writer); elseif (isset($story)) // edit old article $s = get_story_record($story); later in page... print query_select("page", "select p.code, p.description from pages p, writer_permissions w where p.code = w.page and w.writer = '$s[writer]' or w.writer = '$n[writer]'", $s[page]);?> ANdreww ta Andy

« previous php.general (#57556) next »