in reply to Right Number DB

You break out of a while loop with break; Can you be more clear about what you want? You say you want to do something if you have more than two, but your code is testing for two or more. If you want to avoid resetting $type, $car1, and $line after the first record, you need to make that conditional:
while ... ++$count; if ( $count == 1 ) { $type = ... ... }
or just break out of the while loop if $count > 1 before setting $type, et al.

If this isn't helpful, please provide what output you expect to see if there are 1, 2, or 3 database records. Your description is unclear.