Wolphie Posted May 3, 2008 Share Posted May 3, 2008 I was curious, does "as Num" make the result an integer? (Because it's returned as a string otherwise)? SELECT COUNT(*) as Num FROM `tbl_name` If so is there a better way to do this? Link to comment https://forums.phpfreaks.com/topic/104002-solved-mysql-question/ Share on other sites More sharing options...
mrdamien Posted May 3, 2008 Share Posted May 3, 2008 "as Num" just means the field name returned will be named "Num" instead of "COUNT(*)", it doesn't affect the data type. Its returned as an integer because of the COUNT() function. Link to comment https://forums.phpfreaks.com/topic/104002-solved-mysql-question/#findComment-532432 Share on other sites More sharing options...
BlueSkyIS Posted May 3, 2008 Share Posted May 3, 2008 yes, Num is an alias. it could be pretty much anything: Dum, Chair, 34tq34t4t3r, anything. Link to comment https://forums.phpfreaks.com/topic/104002-solved-mysql-question/#findComment-532435 Share on other sites More sharing options...
Wolphie Posted May 3, 2008 Author Share Posted May 3, 2008 Cheers Link to comment https://forums.phpfreaks.com/topic/104002-solved-mysql-question/#findComment-532438 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.