Updating Tables
| From: | Luo, Mark | Date: | Sat, 04 Nov 2000 01:36:00 +0000 |
| Subject: | Updating Tables | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-4205@lists.php.net to get a copy of this message | ||
hi everyone:
this code didn't insert to the database table
$confirm_hash = substr(md5($session_hash . $HTTP_POST_VARS[spelling2] .
time()),0,16);
// $confirm_hash = confirm_hash
$GLOBALS[newWordID] = db_insertid(db_query(
"INSERT INTO WORDS
(word,spelling1,spelling2,definition,email,Cdate,status,who_submit) "
. "VALUES
('$HTTP_POST_VARS[word]','$HTTP_POST_VARS[spelling1]',"
.
"'$HTTP_POST_VARS[spelling2]','$HTTP_POST_VARS[definition]',"
. "'$HTTP_POST_VARS[form_email]','" . time() .
",'P','" //
status
. $confirm_hash
. "'"
. ")"));
the table discription is
+---------------------------+--------------+------+-----+---------+---------
-------+
| Field | Type | Null | Key | Default | Extra
|
+---------------------------+--------------+------+-----+---------+---------
-------+
| a | int(11) | | PRI | 0 |
auto_increment |
| word | varchar(50) | | | |
|
| spelling1 | varchar(50) | YES | | NULL |
|
| spelling2 | varchar(50) | YES | | NULL |
|
| spelling3 | varchar(50) | YES | | NULL |
|
| spelling4 | varchar(50) | YES | | NULL |
|
| definition | mediumtext | | | NULL |
|
| who_submit | varchar(70) | | | |
|
| Cdate | int(11) | | | 0 |
|
| email_contact | varchar(90) | | | |
|
| last_date_of_modification | date | YES | | NULL |
|
| definition_source | varchar(150) | YES | | NULL |
|
| status | char(1) | YES | | NULL |
|
+---------------------------+--------------+------+-----+---------+---------
-------+