Ask a Question related to PHP Development, Design and Development.
-
Gawie Marais #1
insert mysql query into a history table... ?
hi guys,
i have created a 'history' table and would like to insert the 'bare' sql
query into that table just to check who did what on the database...
now, i have this :-
$CustUpdate = "INSERT INTO record SET
recid = '',
customer_code = '$varCustomerCode',
id_reg = '$varId_Reg',
date_added = '$getCurrentDate',
date_modified = '0000-00-00 00:00:00',
date_closed = '0000-00-00 00:00:00',
technician = '$varConsultant',
flag = '$flag',
contact_person = '$varContactPerson',
contact_number = '$varContactNumber',
contact_email = '$varContactEmail',
problem_type = '$varProblemType',
problem_description = '$varProblemDescription',
priority = '$varPriority',
technical_feedback = '',
customer_name = '$varCustomerName'
";
i would like to add the whole query into a text field in the 'history'
table, but i get errors when i try to add it... can anyone help ?
this is the error :-
Invalid query: You have an error in your SQL syntax near '2004-06-23
11:09:57', date_modified = '0000-00-00 00:00:00', date_closed =' at line 6
Gawie Marais Guest
-
Deletion based on the result of a 3 table right joins select query (MySQL 3.23)
I am using MySQL 3.23 I have a relatively complex database with a number of Many to Many relationships (using link tables). I want to delete... -
php/mysql query insert values into enters the records in reverse order
I'm loading tab delimited lines from a txt file using php and running a query for each line to enter the data into a mysql database. However the... -
Login - multi table insert for registrant; subsquent login insert page requests into joined 'Selection' Table
Question regards insert and updates in sql server for a simple login script that requires registration the first time and only "email address" upon... -
I can't insert into mySQL db table - HELP!
I have to get this done by tonight! I have a .CSV file and a PHP file where I am inserting the values of the CSV file into the db table. See the... -
Result of Mysql Query in a PHP table
Hi, I've a problem: I want to have the result of my Mysql Query in a Table in my php file. Now I've this: <? -
Andy Barfield #2
Re: insert mysql query into a history table... ?
Gawie Marais wrote:
[url]http://uk2.php.net/manual/en/function.addslashes.php[/url]> i would like to add the whole query into a text field in the 'history'
> table, but i get errors when i try to add it... can anyone help ?
Andy Barfield Guest
-
Gawie Marais #3
Re: insert mysql query into a history table... ?
thanx guys.
"Gawie Marais" <gmlists@gam.co.za> wrote in message
news:cbbhk8$748$1@ctb-nnrp2.saix.net...> hi guys,
>
> i have created a 'history' table and would like to insert the 'bare' sql
> query into that table just to check who did what on the database...
>
> now, i have this :-
>
> $CustUpdate = "INSERT INTO record SET
> recid = '',
> customer_code = '$varCustomerCode',
> id_reg = '$varId_Reg',
> date_added = '$getCurrentDate',
> date_modified = '0000-00-00 00:00:00',
> date_closed = '0000-00-00 00:00:00',
> technician = '$varConsultant',
> flag = '$flag',
> contact_person = '$varContactPerson',
> contact_number = '$varContactNumber',
> contact_email = '$varContactEmail',
> problem_type = '$varProblemType',
> problem_description = '$varProblemDescription',
> priority = '$varPriority',
> technical_feedback = '',
> customer_name = '$varCustomerName'
> ";
>
> i would like to add the whole query into a text field in the 'history'
> table, but i get errors when i try to add it... can anyone help ?
>
> this is the error :-
>
> Invalid query: You have an error in your SQL syntax near '2004-06-23
> 11:09:57', date_modified = '0000-00-00 00:00:00', date_closed =' at line 6
>
>
Gawie Marais Guest



Reply With Quote

