Hey guys, I have to pass data to another system and instead of comma separated I have to pass fixed width fields
I have to pass order data as a string
IE:
ordernum, customer_number, customer_name
well in my order file the ordernum might be 6 length in the mysql table, the customer_number 7 length, and the customer_name 30 length.
basically what I want to do is test the variable against the field length in the table and then if its less than that, pad the rest of the field with spaces
so my string would look like:
12 6985 John Smith
instead of:
126985JohnSmith
anyone? 🙁