Inserting Into Database Table

hello i want to insert ( transaction ID ) and its 36 length string i added the following:

$data = array
(
'payment_id' => $order_info['payment_id'],
'trnsction_id' => $tranID ,
'status' => $pp_response['order_status']

);


db_query('INSERT INTO ?:xxx ?e', $data);

orderid and payment id were inserted successfully every time i test it but taransaction id keep inserted as 0 ????

any one can help !

perhaps check your spelling?

database table cscart_order_transactions has it listed as

			transaction_id
	




	
		
			
				transaction_id

If type of the trnsction_id column is integer, but you try to insert string, it will be converted to 0

If type of the trnsction_id column is integer, but you try to insert string, it will be converted to 0

i checked and it was set correctly! it holds string and i insert string but keeps appear 0


perhaps check your spelling?

database table cscart_order_transactions has it listed as

transaction_id transaction_id

already checked! :( still inserting 0

So what happens if you replace

 'trnsction_id' =>  $tranID ,

with

 'trnsction_id' =>  123,

Hello

Please show structure table.

Best regards

Robert

Hello

Please show structure table.

Best regards

Robert

CREATE TABLE `xxxxx` (
`ID` int(11) NOT NULL,
`payment_id` int(11) NOT NULL,
`transaction_id` varchar(36) NOT NULL,
`status` varchar(400) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


So what happens if you replace

 'trnsction_id' =>  $tranID ,

with

 'trnsction_id' =>  123,

i tried an it appears empty:

			dot.gif Edit
		
			dot.gif Copy
		
			dot.gif Delete
		
			   24
		
			29          
		
			              
		
			P
	
	
		
			 Edit
		
			dot.gifCopy
		
			dot.gifDelete
		
			  dot.gif25 
		
			29
		
			 
		
			P

columns : ID , payment_id , transaction_id , status

So what happens if you replace

 'trnsction_id' =>  $tranID ,

with

 'trnsction_id' =>  123,

trasaction id holds Universally Unique Identifier. This field should be sent with every request and is unique per request. Example “1e056384-625a-43ba-9876-6ddd7d9a5d51”

Hello

Please show your code inset into this table (copy not rewrite)

Best regards

Robert

Hello

Please show your code inset into this table (copy not rewrite)

Best regards

Robert

trasaction id holds Universally Unique Identifier. This field should be sent with every request and is unique per request. Example “1e056384-625a-43ba-9876-6ddd7d9a5d51”

$data = array
(
'payment_id' => $order_info['payment_id'],
'trnsction_id' => $transID,
'status' => $pp_response['order_status']

);


db_query('INSERT INTO ?:'tablename' ?e', $data);


Hello

trnsction_id ? field name is transaction_id

as you write earlier

CREATE TABLE `xxxxx` (

`ID` int(11) NOT NULL,
`payment_id` int(11) NOT NULL,
`transaction_id` varchar(36) NOT NULL,
`status` varchar(400) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Best regards
Robert

Hello

trnsction_id ? field name is transaction_id

as you write earlier

CREATE TABLE `xxxxx` (

`ID` int(11) NOT NULL,
`payment_id` int(11) NOT NULL,
`transaction_id` varchar(36) NOT NULL,
`status` varchar(400) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Best regards
Robert

thank you so much i checked the spelling now it works :)

Hello

You are welcome :)

Best regards

Robert

thank you so much i checked the spelling now it works :)

guess you did not read my reply above,

perhaps check your spelling?

database table cscart_order_transactions has it listed as

transaction_id

guess you did not read my reply above,

i checked the spelling of the table name ,,, and i did not check the fields name spelling in my code i thought they were right :/

thank you :))))