Similar Posts

Subscribe
Notify of
4 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
tide1109
1 year ago

I found a creative way in a Dart Library.

A map (Key-Value object) is used there. The key is the column name and value of the value to be added to the database. This then forms the SQL statement.

Here find the relevant code detail on GitHub.

You need to adjust it to the PHP Syntax and PHP objects.

If you only set a key and value per line when creating the map, it is clear, even if it contains 40 columns or Code lines will be a little long.

10tel
1 year ago

select into says nothing to me. You mean insert?

When you collect some data, you only need to specify some columns.

Other columns can be automatically filled with data, such as the capture time. Is specified when defining the columns.

Xandros0506
1 year ago

now I’ve split a database with about 40.

A database has no columns. You have a database table with 40 fields or attributes.

is there a clear way of writing?

How to make your SQL statement together within PHP will be left to you. It only has to have the correct syntax when using it.
And no one says you can’t put your statement together as a string of clearer blocks.