Hello again.
I have a site that is hosted with one company and using a database that is hosted with another. Recently, the script stopped working. This is the second time this happened. The first time, it was because the site host updated servers which changed the IP address, so I could no longer access the database. Now, that I worked through that, I'm having issues again, and I am baffled.
The script I'm working with is basically this:
<?php
$link = mysql_connect("localhost_or_IPAddress", "username", "password")
or die("Could not connect : " . mysql_error());
mysql_select_db("strunkwr_test") or die("Could not select database");
$today = getdate();
$query = "SELECT * FROM ltw_eventsv4 WHERE MONTH(event_date) = MONTH(curdate()) AND cat_id = '3' ";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
echo "<b>This Month's Events</b><br>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<font size='6' color='#993300'><b>$line[event_date] </font></b><br>\n";
echo "<i>$line[name]</i><br>\n";
echo "\t\t $line[description]<br>\n";
}
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
?>
There should be 15 rows or records that come up with this code and 15 rows do come up when I run the query directly off of the database (using phpadmin) or when I run it from my personal site which uses the same server.
When I run it from the remote site, I come up with 3 rows or entries. The support staff at the remote site used phpadmin and ran the query off of the database server using the IP address, username and password I gave them....and came up with three rows again!!
Anyone have any ideas what is going on here?
Regards,
Stacy