I have a php form set up that will allow a store to insert vehicle mileage into a mysql database with the columns:
driver_1, driver_2, driver_3, etc. through 10 and has corresponding fields for the the beginning ,ending and total mileage. That's ten possible fields that a driver's number could be in.
My question is...Is there a way to use wild card characters in the column name since there are so many choices? I'll go ahead and say that the driver number can't be hard coded into the form because the driver numbers are constantly changing. Basically, what I want to accomplish is something like...
SELECT end_mileage FROM tbl_mileage WHERE driver_% = 2
where the % is the wildcard character? I've searched all the forums I can think of and went through the mysql manual but can't find anything that looks similar. Anyone know if this is possible?