|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Skip navigation links
Section Navigation [Toggle]
This section describes C API data types other than those used for prepared statements. For information about the latter, see Section 25.2.5, âC API Prepared Statement Data typesâ.
The
© 1995-2008 MySQL AB. All rights reserved. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||



User Comments
From above:
On some systems, attempting to print a value of type my_ulonglong does not work. To print such a value, convert it to unsigned long and use a %lu print format. Example:
printf ("Number of rows: %lu\n",
(unsigned long) mysql_num_rows(result));
This is naive in that this will ONLY work if the underlying unsigned long long is only as big as an unsigned long! This is only half of the total range of the ull.
A better way is to break it into 2 unsigned longs by shifting the upper 32-bits into a different unsigned long and then printf() both the upper and lower parts as unsigned longs each.
Add your own comment.