Here’s something I haven’t figured out and it’s making me scratch my head!
I have two databases and have content in both and use data from one or the other. My idea is to echo the first dB and then say “If that’s empty use the info that’s in the other dB instead”.
For instance:
If Field “content_one” in dB XYZ contains data, then use it.
If Field “content_one” in dB XYZ doesn’t contain date then go to dB ZYY and look in field “content_zyy” and use that.
Assuming you are using mysql_* functions, you can use mysql_num_rows() to determine if you got any results back. If you didn’t, you can execute another query to your 2nd database.
I just realized that the script has to reference an ID such as a common item number and I’m not sure how would the script look with both dB queries in place.
Can you update your example so I can understand better? Also, can I just close the dB call in a second mySQL close connection statement?