iceblox Posted August 17, 2007 Share Posted August 17, 2007 Hi guys, Im not sure if this will be easy however... I have a piece of text which will be stored in a table in mysql in that text is a "count" of how many say cars are in the database.. But im not sure how to get this to work.. Any one got any hints of tips or point me in the right direction? Please Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/65451-variable-inside-vairable-confusedcom/ Share on other sites More sharing options...
flappy_warbucks Posted August 17, 2007 Share Posted August 17, 2007 If your checking for the amount of entries into the database then you can use select count(*) from table did i understand that correctly? Quote Link to comment https://forums.phpfreaks.com/topic/65451-variable-inside-vairable-confusedcom/#findComment-326851 Share on other sites More sharing options...
iceblox Posted August 17, 2007 Author Share Posted August 17, 2007 Hmm lets say i have this text Displayed below are links to find your perfect phone! Simply click on a logo and it will take you to a page full of mobiles by that manufacturer. We currently have X mobiles stored in the database. If there is one that is missing and you feel deserves a place on the site then just send us an email via this link and we will add it asap! This would be stored in the table and id like X to say the number... Quote Link to comment https://forums.phpfreaks.com/topic/65451-variable-inside-vairable-confusedcom/#findComment-326872 Share on other sites More sharing options...
iceblox Posted August 17, 2007 Author Share Posted August 17, 2007 Any Ideas? Quote Link to comment https://forums.phpfreaks.com/topic/65451-variable-inside-vairable-confusedcom/#findComment-327077 Share on other sites More sharing options...
chocopi Posted August 17, 2007 Share Posted August 17, 2007 flappy_warbucks code should work if not $query = mysql_query("SELECT * FROM table") or die(mysql_error()); $num_rows = mysql_num_rows($query) or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/65451-variable-inside-vairable-confusedcom/#findComment-327081 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.