Hi all,
I m nu to the world of php and i m facing some problems in programming it's pages. I have made a complete page but it is showing on execution"Query could not run"????????????????now what's this?

In 1 more page i ve written this commands....

<? $q= "select count(ProductID) from aonline_products;"
$res=mysql_query($q) or die(mysql_error());
echo($res);

and it's saying "error on line 3"????????

?>

Plz.tell me what 2 do???

Thanks.:)

Hi ,

I saw your query. You cant display the records by just using
mysql_query.

After you written the code mysql_query. You will use the result resource set in mysql_fetch_array or some others mysql functions for displaying the records.

Ex..
$a = "select * from taable name";
$q = mysql_query($a);

$b = mysql_fetch_array($q);
echo $b . $b . etch..;

or you may be run a for loop to fetch the records.

Thanku

Thanks Mahe4us's.
I'll look in to it,

Be a part of the DaniWeb community

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