Forum Moderators: open

Message Too Old, No Replies

php, Mysql problem

Mysql isnt givng result even though the command running fine

         

dskaushik5

8:49 pm on Apr 2, 2003 (gmt 0)

10+ Year Member



hi
this is the code i have
$query = "SELECT B.bookCategory,B.bookAuthor,B.bookTitle,B.bookISBN,B.bookPrice,B.bookContact,B.bookRate FROM books B WHERE B.bookCategory = 'Antropology' ";

$result = mysql_query($query) or die("The query has failed");

and this is the corresponding HTML

while ($line = mysql_fetch_array($result))

{
print"

<tr>
<td width=\"14%\">$line[bookCategory]</td>
<td width=\"14%\">$line[bookAuthor]</td>
<td width=\"14%\">$line[bookTitle]</td>
<td width=\"14%\">$line[bookISBN]</td>
<td width=\"14%\">$line[bookPrice]</td>
<td width=\"15%\">$line[bookContact]</td>
<td width=\"15%\">$line[bookRate]</td>
</tr>

In my database i have category Antropology but still its not pulling the results. buy it doesnt show any error

Any suggestions.
thanks
Deepak

DrDoc

9:16 pm on Apr 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, this is hardly a topic for the "HTML and Browsers" forum. Besides, you already posted this in the PHP/Perl forum, and I believe you got some helpful answers there :)

[webmasterworld.com...]