ausipodskins Posted May 16, 2004 Posted May 16, 2004 I replaced all occurrences of - 'now()' - with - $aus_date_time - and - now() - with - '".$aus_date_time."' - to reflect my local time zone. Everything was working ok until I needed to revise the product quantity in stock. I made the update to stock level in the admin area and when I pressed 'update' I got this message: 1054 - Unknown column '$aus_date_time' in 'field list' update products_description set products_name = ' ... [ my product description was shown here] ... ', products_url = $aus_date_time where products_id = '99' and language_id = '1' [TEP STOP] The path of my browser says: "http://server root/catalog/admin/categories.php?cPath=43&pID=99&action=update_product" I have replaced the admin/categories.php file with a saved version but that didn't correct the problem. It seems that the error is in another file. Can anyone tell me which file I should be looking in to try and fix this problem?
masat Posted May 16, 2004 Posted May 16, 2004 You will need to rename all the table fields in your database that are called by the queries you changed in your code. This however could cause repercusions in other files that run queries on that particular table. This is what the error is saying. Your code has run an update query and was unable to locate field 'aus_date_time' in table 'products_description' (because you changed the field name in the code). In my opinion you made a bad move changeing that code. You should change it back and forget about the time thing. Tim Fortune How do you know when you know what you want to do for the rest of your life?
ausipodskins Posted May 17, 2004 Author Posted May 17, 2004 thanks for the suggestions. What I don't understand is why the code is calling for a timestamp in a url field. The changed timestamp instruction [now() replaced by $aus_date_time] works fine elsewhere and didn't need defining in any tables. You don't think that this error could be caused by me accidentally inserting $aus_dat_time in the wrong place? You don't know which .php file is calling up the table do you, because it doesn't seem to be the admin/categories.php file.
Guest Posted May 19, 2004 Posted May 19, 2004 without seeing all the code, or if you changed some other code, kind of tough. what program is running at this time?
ausipodskins Posted May 19, 2004 Author Posted May 19, 2004 I'm running the latest osC. The only code I changed related to the now() expression. I've looked inside the database backup and there's no text in there with the now() expression or the $aus_date_time expression. I realise that there must be some erroneous code somewhere but I have no idea where to even look for it so that I can post it here. I would post the categories php file, but I also got the same error when trying to create a new account. So it sound's like the error is in a file common to both areas. But which one?
Pixxi Posted May 29, 2004 Posted May 29, 2004 I think John might have been asking what php file was active at the moment you get the error - it will show the file that's active on your browser's URL/address line. When you say 'the latest osC' do you mean MS 2.2 (the last milestone stable release) or a CVS snapshot later than MS 2.2? Did you keep a list of the files you changed? If not, as a starting point, you could try a global find on the string '$aus_date_time' to see which files you have changed it in, then change them back to now() one file at a time till the error goes away.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.