Hello
I tried to insert data into the DB
Here is a screenshot of error message
Here is the report:
Here is the table structure:
And here is the result:
And here is the code where the error is
$db->beginTransaction();
$stmt = $db->prepare('INSERT INTO `data`
(username, ticket, o_time, type, size, item, o_price, s_l, t_p, c_time, c_price, profit)
VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
for($i=0;$i<$count;$i++){
$stmt->execute($line[$i]);
}//End for loop
$db->commit();
And this is the code where the data is created:
if((isset($o_time) && $keywords[4]<$o_time) || !isset($o_time)===true){
//Insert row content into array.
//Insert relevant data into array
$ticket =$keywords[2];
$o_time = $keywords[4];
$type = $keywords[6];
$c_time = $o_time;
$line[$count] = array($username, $ticket, $o_time, $type, NULL, NULL, NULL, NULL, NULL, $c_time, NULL, NULL );
$count++;
How do I calculate and define the size of the float number?
The code stopped where the profit is -100000.00
What is the solution ?