[PHP-DB] Update Query?
Hello- I'm trying to run an update query in an application I'm making. I keep getting a MySQL error however when I try and print out the mysql_error() nothing is returned. I run the same query in phpMyAdmin and the query runs fine. Below is the update query I'm running and the php code that I'm using to build it. Any suggestions? update news set newsOrder=2 where station_id=5 and id=3 $query = update news set newsOrder=.$order. where station_id=$stationid and id=.$orderNewsID; thanks, jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Last Modified question..
I have a problem... I want to check the last modified time that a file was changed/updated. Actually, it's an employee database that I'm working on and I thought about just checking the last modified date on the file that the information was stored on. However, I get a permission denied error and I don't want to change the permissions of the file. Is there an easy way to check to see when the last time anyone logged in and updated their 'employee' information? Thanks, jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Last Modified question..
A) It's a MySQL database that I'm using B) I'm using file_exsist() and to check the modified date I'm using filemtime() C) If I modify the permissions on the file wouldn't that possibly cause some security issues? Thanks, jay - Original Message - From: Justin Buist [EMAIL PROTECTED] To: Jay Paulson [EMAIL PROTECTED] Cc: PHP DB list (E-mail) [EMAIL PROTECTED] Sent: Tuesday, August 28, 2001 4:44 PM Subject: Re: [PHP-DB] Last Modified question.. a) What kind of database is this? b) use fstat() to check the modification time on a specific file. c) You will have to modify permissions so that the user your web server runs as has 'read' permission on the file if you want to use fstat(). Justin Buist Trident Technology, Inc. 4700 60th St. SW, Suite 102 Grand Rapids, MI 49512 Ph. 616.554.2700 Fx. 616.554.3331 Mo. 616.291.2612 On Tue, 28 Aug 2001, Jay Paulson wrote: I have a problem... I want to check the last modified time that a file was changed/updated. Actually, it's an employee database that I'm working on and I thought about just checking the last modified date on the file that the information was stored on. However, I get a permission denied error and I don't want to change the permissions of the file. Is there an easy way to check to see when the last time anyone logged in and updated their 'employee' information? Thanks, jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] restoring mysql db after mysqldump
actually the owner of the tables/files that all_databases.sql creates is mysql.mysql.. and it still says read only.. and they are chmod'ed to 660... like i said before i'm really lost as to why it's doing this. jay - Original Message - From: Brunner, Daniel [EMAIL PROTECTED] To: 'Jay Paulson' [EMAIL PROTECTED] Cc: PHP List (E-mail) [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 12:24 PM Subject: RE: [PHP-DB] restoring mysql db after mysqldump Hello!!! Make sure that the ownership of the files are mysql.mysql This as happened to me too!!! I might be wrong but it worked for me Dan -- From: Jay Paulson Reply To: Jay Paulson Sent: Wednesday, August 22, 2001 11:29 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] restoring mysql db after mysqldump Hello everyone- I have done the mysqldump function and got the db in a all_database.sql file. Now I am running this command at the shell prompt of my Linux machine: mysql -u root -p -e 'all_databases.sql' When I do that it works fine until it starts to insert the information into the database. I get the error that the table it is trying to read the information into is 'read only'... Is there anyway around this problem? Thanks, Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] MySQL ERROR 1036: Table 'foo' is read only
Running on RH, Apache. I had this working on Win2K, then switched to Linux by running the mysqldump then moving over the dump file and runing the mysql -u root -p 'add_databases.sql'. It creates the database then the table and then it tries to populate the table and i get an ERROR 1036: Table 'foo' is read only. Anyone know why this is happening and or how to fix it? Thanks, Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] restoring mysql db after mysqldump
I've checked and the ROOT user has access to everything... but still no luck.. when i run the mysql -u root -p 'all_databases.sql' it gets to the first table and tries to insert some information into it and says blah table is read only and it stops... jay - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Jay Paulson' [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 12:18 PM Subject: RE: [PHP-DB] restoring mysql db after mysqldump Are your privileges in MySQL set correctly? If ROOT doesn't have read/write access, the script will crash. rick -Original Message- From: Jay Paulson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 11:29 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] restoring mysql db after mysqldump Hello everyone- I have done the mysqldump function and got the db in a all_database.sql file. Now I am running this command at the shell prompt of my Linux machine: mysql -u root -p -e 'all_databases.sql' When I do that it works fine until it starts to insert the information into the database. I get the error that the table it is trying to read the information into is 'read only'... Is there anyway around this problem? Thanks, Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] MySQL read only?
Anyone know why a MySQL table is set to read only? I'm logged in as the root user of MySQL and I have checked the privalages of the root user in the MySQL table and everything is set to Yes and I'm able to add and delete users in the MySQL table. Here's what I did... I had a database on my Win2k machine and I just ftp'ed those files over to MySQL running on RedHat. I noticed that the permissions of the files on the RedHat box were different than the MySQL database so I changed the permissions on those files I ftp'ed over. But to no evail it still doesn't work correctly. Would it make a difference if I was using a earlier version of MySQL on my Win2k machine than on the RedHat machine? Anyway, I'm at a total lost here so any help would be great! Thanks, Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] MySQL read only?
Hello everyone-- I keep getting an error with MySQL when I try to Update or Insert a record into my database. The error message is as follows: MySQL said: Table 'zone' is read only I went and checked the files and set the permissions on them so that they were read and write only but that didn't help. I'm wondering if it's a setting in MySQL. Can someone point me in the right direction for getting the Update and Inserting fixed? Thanks! Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]