desoto0311 Posted April 4, 2009 Share Posted April 4, 2009 I've got two tables laid out as such: table 1: "articles" L id L catid L title L author L desc table 2: "files" L id L articleid L filename I've got the SQL statement: $sql = "SELECT * FROM articles, files WHERE files.articleid = articles.id"; and a while statement to create my variables. (for later placement into a smarty template) while ($a_row = sqlFetchArray($res)) { $records[$c]["id"] = $a_row["id"]; // note: this repeats for all variables. } The problem is, when referencing said variables in the $records array, it seems I can only output those from the first table (articles). Those from the second table aren't seen at all. Am I missing something? ------------------------------- MySQL: v.5.0 PHP: v.5.2.5 Thanks, -D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.