I bir SQL sorgusu benim verileri yazdırırken i INNER kaybolur uyarıların çoğu KATILDI kaldırmak zaman, undefinded dizin uyarılar bir demet alıyorum. Ben o hataya neden olduğunu emin değilim.
Benim kodu burada:
<?php
$id = $_GET['id'];
$sql = "SELECT * FROM updates INNER JOIN clients ON updates.c_id = clients.c_id INNER JOIN pages ON updates.page = pages.p_id INNER JOIN projects ON updates.p_id = projects.p_id WHERE u_id='$id' LIMIT 1";
echo $sql;
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($result);
// put update_id in hidden form and pass it to the next page
$u_id = $row['u_id'];
?>
<h4>Viewing update for <i><? echo $row['fname'] ." ". $row['lname'] ?></i> for their <i><a href="<? echo $row['p_url']; ?>" title="View <? echo $row['p_title']; ?>"><? echo $row['p_title']; ?></a> project</i></h4>
<h4><b>Posted on: </b> <? echo $row['date_submitted'] = date("F j, Y, g:i a"); ?></h4>
Ben ne yapabilirim üzerinde herhangi bir fikir? "Fname" ve "Soyad" orada saklanır çünkü ben INNER JOIN istemciler için var nedeni
clients.c_id = updates.c_id
Ben var burada: "p_url" "p_title" Bu da tabloda projeler depolanır:
clients.c_id = projects.c_id
Edit with new problem
Benim kodu burada:
$sql = "SELECT
updates.u_id AS u_id,
updates.date_submitted AS date_submitted,
updates.deadline AS deadline,
updates.description AS description,
updates.priority AS priority,
pages.page_name AS page_name,
clients.fname AS fname,
clients.lname AS lname,
projects.p_url AS p_url,
projects.p_title AS p_title,
FROM updates INNER JOIN clients ON updates.c_id = clients.c_id INNER JOIN pages ON updates.page = pages.p_id INNER JOIN projects ON updates.p_id = projects.p_id WHERE u_id='$id' LIMIT 1";
Hata:
Değil eşsiz tablo / rumuz: 'müşteri'