[eluser]slowgary[/eluser]
I'm confused by your description, but probably because I didn't feel like drawing a picture of it with a pen and paper
I think maybe there's a better way to do what you're attempting. I'm not entirely sure what that is (that you're attempting), but I'm just guessing it's a bad idea to allow users to create database tables. What happens when you have 1000 users? How does your app determine which table to search from?
Again, I haven't taken the time to understand your problem, but I bet there's a WAY better method of implementing your needs. Try doing something more along these lines:
Code:
services table
======================
service_id
service_field1
service_field2
attributes table
======================
attr_id
attr_name
service_attributes table
======================
service_id
attr_id
service_values table
======================
service_id
attr_id
value
This way your users can create new services, and different services can reuse the same attributes. So you'd add new services to the services table, new 'fields' to the attributes table, then you'd store an entry in service_attributes for each field that belongs to a service. Then when it comes time to submitting the form, you'd store the actual values in the service_values.
Does that sound similar to what you're trying to do?
Hope this helps.