CComley
07-03-2012, 03:43 PM
Hello everyone.
Before I start, let me say that I'm very limited in my knowledge of PHP and other types of coding (except for HTML, I'm pretty good at that, but it's horribly outdated)
I help run a dining guide website for my company. We're trying to make a mobile version of this website which will update automatically when we change the database.
Here's what I need to do, I have a database that has almost 300 restaurants. Each one of those restaurants has 43 fields, (things like hours, address, food type, phone number, price, etc. etc. etc). One of they key fields is "status". When "status" is set to "1" in the database, the restaurant shows up on the website. If "status" is set to "0", the restaurant is hidden from the user.
I've read multiple tutorials on how to generate an XML document via PHP, but I did not see anything anywhere that basically says "Only put the restaurants where "status" = "1" into the XML document".
Also, out of those 43 fields, I only need to use roughly 30 or so of them for the mobile site. How do I use PHP to only select some of them and not every row in the database?
Thanks!
Before I start, let me say that I'm very limited in my knowledge of PHP and other types of coding (except for HTML, I'm pretty good at that, but it's horribly outdated)
I help run a dining guide website for my company. We're trying to make a mobile version of this website which will update automatically when we change the database.
Here's what I need to do, I have a database that has almost 300 restaurants. Each one of those restaurants has 43 fields, (things like hours, address, food type, phone number, price, etc. etc. etc). One of they key fields is "status". When "status" is set to "1" in the database, the restaurant shows up on the website. If "status" is set to "0", the restaurant is hidden from the user.
I've read multiple tutorials on how to generate an XML document via PHP, but I did not see anything anywhere that basically says "Only put the restaurants where "status" = "1" into the XML document".
Also, out of those 43 fields, I only need to use roughly 30 or so of them for the mobile site. How do I use PHP to only select some of them and not every row in the database?
Thanks!