swoole_table->set
�����е����ݣ�swoole_tableʹ��key-value�ķ�ʽ���������ݡ�
swoole_table->set(string $key, array $array)
- $key�����ݵ�key����ͬ��$key��Ӧͬһ�����ݣ����setͬһ��key���Ḳ����һ�ε�����
- $value��������һ�����飬�������ֶζ����$name��ȫ��ͬ
swoole_table->set() ��������ȫ���ֶε�ֵ��Ҳ����ֻ�IJ����ֶ�
swoole_table->set() δ����ǰ���������ݵ������ֶξ�Ϊ��
set/get/del ���Դ����������Բ���Ҫ����lock����
$table->set('tianfenghan@qq.com', array('id' => 145, 'name' => 'rango', 'num' => 3.1415)); $table->set('350749960@qq.com', array('id' => 358, 'name' => "Rango1234", 'num' => 3.1415)); $table->set('hello@qq.com', array('id' => 189, 'name' => 'rango3', 'num' => 3.1415));
���ó�������ַ���
��������ַ������ȳ������ж���ʱ�趨�����ߴ磬�ײ���Զ��ضϡ�
ʾ����
$table->column('str_value', swoole_table::TYPE_STRING, 5); $table->set('hello', array('str_value' => 'world 123456789'));
- �Զ�����
str_value
�����ߴ�Ϊ5�ֽڣ���set
�����˳���5�ֽڵ��ַ��� - �ײ���Զ���ȡ5�ֽڵ����ݣ�����
str_value
��ֵΪworld