Unknown column
Posted: Tue Jul 03, 2007 2:37 pm
Hi
I want to show the user his articles using this code:
but the output is:

I want to show the user his articles using this code:
Code: Select all
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("articles") or die(mysql_error());
$result = mysql_query("SELECT * FROM articles WHERE username={$_SESSION['username']} ORDER BY id") or die(mysql_error());?> <p align=center> your articles</p> <?
while($row = mysql_fetch_array( $result )) {
echo $row['subject'] ."<br>".$row['title']."<br>".$row['text']."<br><br>";
}
mysql_close();
?>I have checked the spelling and have not found a mistake. it's so strangeUnknown column 'm2babaey' in 'where clause'