You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `into()` method is used to specify the table to insert data to.
1253
1253
1254
1254
```php
1255
-
$insert->into('co_invoices');
1255
+
$insert
1256
+
->into('co_invoices')
1257
+
;
1258
+
1259
+
$insert->perform();
1260
+
// INSERT INTO co_invoices
1256
1261
```
1257
1262
1258
1263
##### Columns
@@ -1263,6 +1268,8 @@ $insert
1263
1268
->into('co_invoices')
1264
1269
->column('inv_total', 100.12)
1265
1270
;
1271
+
1272
+
$insert->perform();
1266
1273
// INSERT INTO co_invoices (inv_total) VALUES (:inv_total)
1267
1274
```
1268
1275
@@ -1275,6 +1282,8 @@ $insert
1275
1282
->column('inv_total', 100.12);
1276
1283
->column('inv_status_flag', 0, PDO::PARAM_BOOL)
1277
1284
;
1285
+
1286
+
$insert->perform();
1278
1287
// INSERT INTO co_invoices (
1279
1288
// inv_cst_id,
1280
1289
// inv_total,
@@ -1298,6 +1307,8 @@ $insert
1298
1307
]
1299
1308
)
1300
1309
;
1310
+
1311
+
$insert->perform();
1301
1312
// INSERT INTO co_invoices (
1302
1313
// inv_cst_id,
1303
1314
// inv_total
@@ -1320,6 +1331,8 @@ $insert
1320
1331
->column('inv_total', 100.12)
1321
1332
->set('inv_created_date', 'NOW()')
1322
1333
;
1334
+
1335
+
$insert->perform();
1323
1336
// INSERT INTO co_invoices (
1324
1337
// inv_total,
1325
1338
// inv_created_date
@@ -1383,7 +1396,7 @@ $insert
1383
1396
->set('inv_created_date', 'NOW()')
1384
1397
;
1385
1398
1386
-
echo $insert->getStatement();
1399
+
$insert->perform();
1387
1400
// INSERT INTO co_invoices (
1388
1401
// inv_cst_id,
1389
1402
// inv_total,
@@ -1411,7 +1424,7 @@ $insert
1411
1424
->setFlag('LOW_PRIORITY')
1412
1425
;
1413
1426
1414
-
echo $insert->getStatement();
1427
+
$insert->perform();
1415
1428
// INSERT LOW_PRIORITY INTO co_invoices (
1416
1429
// inv_total,
1417
1430
// inv_created_date
@@ -1452,6 +1465,36 @@ $factory = new QueryFactory();
1452
1465
$select = $factory->newSelect($connection);
1453
1466
```
1454
1467
1468
+
#### Execution
1469
+
1470
+
The [Phalcon\DataMapper\Query\Select][datamapper-query-select] builder acts as a proxy to the [Phalcon\DataMapper\Pdo\Connection][datamapper-pdo-connection] object. As such, the following methods are available, once the query is built:
0 commit comments