How can i display result of a single cell query?
my query is

$q="Select authorid from authors where AuthorName=$author";
$num=mysql_num_fields($resultauthor); [B]<<Error coming here![/B] :( mysql_num_fields(): supplied argument is not a valid MySQL result resource in
Re: Single cell query! 80 80

The error is here


Try chaging the query to this

$q="Select authorid from authors where AuthorName='$author'";

Probably its because of the missing '' or simply, you´re not getting the POST variable authorname

Try this

echo $author;

Do you get what you expect?
If nothing of this works, then you have a problem in $connect


Re: Single cell query! 80 80

thnx. I just figured it out! thnx again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.