I'm sure this question has been asked, but I can't find it so I'll ask again.
I have a database where the tables use primary key ID fields that are autoincrement.
I'm using one table row that will accumulate (concatenate) IDs of users who have accessed that particular item.
So, when I query to verify that certain users have accessed an item, I need to add a zero to the front of the single-digit ID's. (otherwise querying for "1" will return TRUE with 10, 11, 12, etc.
How do I add a zero to the single-digit ID's?
-- this question relates to both (or either) mySQL and PHP.
In mySQL, I'd like to just store 01, 02, 03, etc. as the original ID's, but don't know how to do that.
For future knowledge with PHP, I tried concatenating $t = '0'.$t; but that obviously didn't do anything. So, how do I do that as well?
THanks!