G
G
Godmode2015-11-12 09:17:55
PHP
Godmode, 2015-11-12 09:17:55

Choose serialize or json_decode?

I want to store information about weekends/working days and working hours in the database. 1 cell = 1 month.
Example:

$arr = array(
'1' => 0, // 1е число выходной
'2' => 8-18, // 2го числа работают с 8 до 18
'3' => 9-14 // 3го числа работают с 9 до 14
);

Which is better, faster for processing serialize or json_decode and how do you like this storage format, maybe there are other more efficient convenient ways?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philip, 2015-11-12
@god_mode_admin

It is quite possible to store data in json, many subds support it, for example postgresql. Regarding Vladislav's answer - it is possible and so, then you need to create a table with a schedule, and then act according to the situation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question