I recently add two new columns (month & year) to a table in our test database for a client. I wrote some PHP code to query the new columns and everything worked fine. I then made the exact same changes to our production database which uses the phpMyAdmin web interface at our hosting provider. It clearly shows the two new columns I added to the table in question and I could successfully query on the new columns from phpMyAdmin. When I posted PHP page with the updated query I received the following error,
Warning: Supplied argument is not a valid MySQL result resource in: php.php/line blah blah blah
Upon further investigation I discovered that the error was caused by "no column named 'year' in field list. I tried flushing the table and also had the administrator restart the MySQL server, all to no avail. I just can't figure out why the new columns are not recognized in the SQL query. Like I said, the same query worked fine on our test box after I had added the two new columns to the table.
Has anybody else ever encountered this?
Warning: Supplied argument is not a valid MySQL result resource in: php.php/line blah blah blah
Upon further investigation I discovered that the error was caused by "no column named 'year' in field list. I tried flushing the table and also had the administrator restart the MySQL server, all to no avail. I just can't figure out why the new columns are not recognized in the SQL query. Like I said, the same query worked fine on our test box after I had added the two new columns to the table.
Has anybody else ever encountered this?