Hi All,
I am confused about something, although I have used it in the past, I don't
understand why it worked !!! :)
The following snippet from another's question provides a good example:
> mysql_query(&sock, "select count(*) from products")
>
> result = mysql_store_result(&sock))
>
> oneRow = mysql_fetch_row(result);
>
> printf("%d", oneRow[0]);
colum[0] of oneRow holds the result from "Count(*)". Why is this? Is there
a general explaination of this in the docs somewhere? Is it just an SQL
rule to follow when using different functions in a query?
I've seen others use "Select Count(*) as thecnt" then reference the return
as the variable "thecnt". How is this done?
Suppose I had two or three functions returning results, how would I
reference the return values from each?
Thanks very much,
Barry.