Re: Troubles Inserting into MYSQL

From: Date: Sun, 08 Sep 2002 19:20:57 +0000
Subject: Re: Troubles Inserting into MYSQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115679@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey, Send the results of mysql_errno() please. :) ~Pauly if ($update_type == update_Williams) { mysql_query("INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", $sql4) or echo mysql_errno()/*die ("could not do update")*/; } On Sunday 08 September 2002 03:07 pm, you wrote: > Hello, > > My code below always dies! I've tried just about every iteration of the > values, etc.. Can anybody show me how to insert into MySQL a value? > > "INSERT INTO events ('user','detaildesc') VALUES > ('$user','$details')" > > I just don't get it! > > > if ($update_type == update_Williams) { > mysql_query("INSERT INTO events ('user', 'detaildesc', > 'index', > 'reference', 'date_added') VALUES (\'$cookiewho\', > > \'$add_Williams\',\'\',\'$row_num\',\'$last_update\')", > $sql4) > or die ("could not do update"); > } - -- ~Paul Nicholson Design Specialist @ WebPower Design "The web....the way you want it!" paul@webpowerdesign.net "It said uses Windows 98 or better, so I loaded Linux!" Registered Linux User #183202 using Register Linux System # 81891 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi BmSkmFZDBbXuAm+g3nvw/tc= =InFX -----END PGP SIGNATURE-----

« previous php.general (#115679) next »