Re: [PHP-DB] Inserting data into MySQL
yes, or you need to use the 'INSERT INTO ([field1, field2...]) values (['val1', 'val2'...]) syntax. check the mysql insert syntax. http://www.mysql.com/doc/en/INSERT.html - john On Sat, Mar 15, 2003 at 06:37:54PM -0500, Louie Henry [EMAIL PROTECTED] wrote: Good Day All! I have been working a php/mysql and I have ran into a small problem. I have written an html form for inserting data, and it will not insert it. I am able to query the data from the data. I here is some of the code, maybe some one could point out the error. __ $query = INSERT into TBLutnsUser values ( .$fname., .$lname., .$email., .$phonenum., .$celnum., .$address., .$city., .$prov., .$postalcode.); __ There is one other field that is not in here, that is userIndex. and it is the indexing/primary key, and it is auto_increment. dose it need to be added in here too? Thank You -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Syncing the structure of two databases?
it's not PHP, but mysqldiff is a perl tool that would probably give you the desired results. it can generate the SQL necessary to sync databases. http://adamspiers.org/computing/mysqldiff/ (sorry if anyone got this in duplicate, i was having probs sending to the list until i fixed the envelope.) - john On Thu, Mar 13, 2003 at 09:16:51PM -0500, John W. Holmes [EMAIL PROTECTED] wrote: I'm developing an intranet-based application using PHP and MySQL. We release new versions of our application regularly, and synchronizing the structure of the databases is beginning to be a headache. Do any tools exist that would let me sync the structure of two databases? Ideally, I'd like to include a mysqldump --no-data (or something analogous) file with each of our releases, and run a script on the client's server that would update the structure of their own local database from that file. We're cross-platform (windows, linux, and mac). And, all servers are behind their own firewalls. I'm aware of sqlyog (http://www.webyog.com/sqlyog/download.html), but I need something that can be written in php, and works without a live connection to the master database. I don't know of any automatic way to do it. It wouldn't be too hard to write a little PHP script that gets the difference between two mysqldump files and generates the appropriate ALTER and INSERT queries to bring the old database up to date. An exec call do diff might even make it easier (I don't know anything about diff, but I'm guessing it could help.) Actually, now that I think a little more about it, it would be a little hard, but not impossible. :) ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php