SpyLOG
PHP-Nuke ��-������    �������
���������
��������
 ����
�������
����
 �������
������������
�������
 ������
�������
������
 �����
�������
��������
 �����
������������
�������
 �����
������
���������
������� ���
����� �����

XLIV. ������� Informix

��������

������� Informix ��� Informix (IDS) 7.x, SE 7.x, Universal Server (IUS) 9.x � IDS 2000 ���������� � "ifx.ec" � "php3_ifx.h" � ���������� ���������� informix. ��������� IDS 7.x ������ ������������, � ������ ���������� �������� BYTE � TEXT. ��������� IUS 9.x �������� ���������: ������� ����� ���� ������, �� ��������� SLOB � CLOB �� ��� � ������ ����������.

����������

��������� �� ������������: ��� ���������� ������ ESQL/C ��� ���������� �������� Informix ��� ���. ESQL/C ������ � 7.2x ������ �������� ���������. ESQL/C �������� ������ ������ Informix Client SDK.

���������, ��� ���������� "INFORMIXDIR" ����������� � ��� $INFORMIXDIR/bin ������� � ����� ���������� ��������� PATH, ������ ��� ��������� ������ "configure".

���������

����������: ������ configure ����� ������������� ���������� ���������� ��������� � include, ���� �� ��������� configure --with_informix=yes. �� ������ �������������� ��� ���������������, �������������� "IFX_LIBDIR", "IFX_LIBS" � "IFX_INCDIR" � ���������. ������ configure ����� ���������� ���������� ������ ������ ������� Informix. �� ��������� ���������� �������� ���������� "HAVE_IFX_IUS", ���� ���� ������ Informix >= 9.00.

������������

����������: ���������, ��� ���������� ��������� Informix INFORMIXDIR � INFORMIXSERVER �������� ��� PHP ifx-�������� � ��� ���������� INFORMIX bin ��������� � PATH. ��������� ���, �������� ������, ���������� ����� phpinfo(), ������ ��� ������ ������������. �� ������ phpinfo() ��� ���������� ������ ���� �����������. ��� TRUE ��� ��� CGI php, ��� � ��� Apache mod_php. ��� ����� ������������ ���������� ��� ���������� ��������� � ��������� ������� ������ Apache.

��������� ������������ ���������� Informix ����� ������ ���� �������� ���������� (��������� LD_LINBRARY_PATH ��� ld.so.conf/ldconfig).

��������� ��������� �� ������������� BLOB'�� (������� TEXT � BYTE): BLOB'� ��������� ���������� BLOB-����������������. ������� ������� ���������� "blob id" ��� ������� ������� BYTE � TEXT. �� ������ �������� ���������� � ������� "string_var = ifx_get_blob($blob_id);", ���� �� ������� ��������� BLOB'�� � ������ (� �������: "ifx_blobinfile(0);"). ���� �� ������������� �������� ���������� BLOB-�������� � �����, ����������� "ifx_blobinfile(1);", � "ifx_get_blob($blob_id);" ���� ��� filename. ����������� ���������� I/O ������ ��� ��������� ����������� blob.

��� �������� insert/update �� ������� ������� ��� "blob id'�" �������������� � ������� " ifx_create_blob();". ����� ���������� blob id'� � ������ � ��������� blob-������� ������ ������� (?) � ������ �������. ��� update/insert �� ������������ �� ��������� blob-����������� � ������� ifx_update_blob().

��������� BLOB-�������� ����� ���� �������� ����������� ������������, ��� ����� ����� ������� �� ����� ������� ���������:

���������� ������������ : ifx.textasvarchar

���������� ������������ : ifx.byteasvarchar

runtime-������� :

ifx_textasvarchar(0) : ������������ blob id'� ��� select-�������� �� ��������� TEXT

ifx_byteasvarchar(0) : ������������ blob id'� ��� select-�������� �� ��������� BYTE

ifx_textasvarchar(1) : ���������� ������� TEXT, ��� ���� �� ��� ���� ��������� VARCHAR, ����� ��� �� ����� ���� ������������ blob id'� ���select-��������

ifx_byteasvarchar(1) : ���������� ������� BYTE, ��� ���� �� ��� ���� ��������� VARCHAR, ����� ��� �� ����� ���� ������������ blob id'� ��� select-��������

���������� ������������ : ifx.blobinfile

runtime-������� :

ifx_blobinfile_mode(0) : ���������� ������� BYTE � ������, blob id ��������� �������� ����������

ifx_blobinfile_mode(1) : ���������� ������� BYTE � �����, blob id ��������� �������� ��� �����

���� �� �������������� ��� ifx_text/byteasvarchar �������� 1, �� ������ ������������ ������� TEXT � BYTE � select-��������, ��� ���������� (�� �� �� long) ���� VARCHAR. ��������� ��� ������ "����������" � PHP, �� ������� "binary safe". �� ������� ���������� ��� ���������. ������������ ������ ����� ��������� �� ��� ������, �� ��������� �� ����������.

���� �� �������������� ��� ifx_blobinfile �������� 1, ����������� ��� �����, ������������ ifx_get_blob(..), ��� ��������� blob-�����������. ��������, ��� � ���� ������ �� ��������� �� �������� ��������� ������, ��������� INFORMIX, ����� ���������� ����. ������ ����� ����������� ��� ������� ����� ��������� ���� ��� ������� ������� BYTE.

���������� ��������� ������ ����� ���� ��������� ���������� ��������� "blobdir", �� ��������� "." (������� ����������). ���-�� �����  putenv(blobdir=tmpblob"); �������� �������� ��������� ������, �������� ����������� (����� �� ���� ���������� � "blb").

�������������� ������� "char"-������ (SQLCHAR � SQLNCHAR): ��� ����� ���������� ���������� ���������

ifx.charasvarchar : ���� ����������� 1, ������� ������� ������������� ���������, ����� ��� ��������� ������� "���������/chopping".

NULL-��������: ���������� ������������ ifx.nullformat (� ������� ������� ���������� ifx_nullformat()), ���� ����������� � TRUE, ��������� NULL -������� ��� ������ "NULL", ���� ����������� FALSE, ��� ��������� ������ ������. ��� ��������� ��� �������� ����� NULL -��������� � ������� ���������.

���� ��������

��������������� ���������

��� ���������� �� ���������� ������� ��������.

����������
ifx_affected_rows - �������� ���������� �����, ��������������� � �������
ifx_blobinfile_mode - ������������� blob-����� �� ��������� ��� ���� select-��������
ifx_byteasvarchar - ������������� byte-����� �� ���������
ifx_close - ��������� ���������� Informix
ifx_connect - ��������� ��������� ���������� Informix
ifx_copy_blob - ��������� ������ blob-������
ifx_create_blob - ������ blob-������
ifx_create_char - ������ char-������
ifx_do - ��������� ����� �������������� SQL-��������
ifx_error - ���������� ��� ������ ���������� ������ Informix
ifx_errormsg - ���������� ��������� �� ������ ���������� ������ Informix
ifx_fetch_row - �������� ��� ��� ������������ ������
ifx_fieldproperties - ����� ������ ������� SQL-�����
ifx_fieldtypes - ����� ������ Informix SQL-�����
ifx_free_blob - ������� blob-������
ifx_free_char - ������� char-������
ifx_free_result - ����������� ������� ��� �������
ifx_get_blob - ���������� ���������� blob-�������
ifx_get_char - ���������� ���������� char-�������
ifx_getsqlca - �������� ���������� sqlca.sqlerrd[0..5] ����� �������
ifx_htmltbl_result - ����������� ��� ���� ������� � ���� HTML-�������
ifx_nullformat - ������������� return-�������� �� ��������� ��� ���������� ����
ifx_num_fields - ���������� ���������� �������� � �������
ifx_num_rows - ������������ ����, ��� ����������� �� �������
ifx_pconnect - ��������� ���������� ���������� Informix
ifx_prepare - ������� SQL-�������� ��� ����������
ifx_query - ���������� Informix query
ifx_textasvarchar - ������������� ��������� ����� �� ���������
ifx_update_blob - ��������� ���������� blob-�������
ifx_update_char - ��������� ���������� char-�������
ifxus_close_slob - ������� slob-������
ifxus_create_slob - ������ slob-������ � ��������� ���
ifxus_free_slob - ������� slob-������
ifxus_open_slob - ��������� slob-������
ifxus_read_slob - ������ n ���� slob-�������
ifxus_seek_slob - ������������� ������� ������� ����� ��� ������
ifxus_tell_slob - ���������� ������� ������� ����� ��� ������
ifxus_write_slob - ���������� ������ � slob-������

��������������� �����
imap_utf8����� ifx_affected_rows

RigaNet - Internet studio
For Web site issues, contact the Web master.

Rambler's Top100 �������@Mail.ru SpyLOG RigaNet