|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I'd like to store a struct Foo, which is defined as: ,---- | struct Foo{ | int a, b; | }; `---- as a varbinary type field into database. How can I read/write this varbinary type? I'm afraid I didn't find out much from the mysql references. -- William http://williamxu.net9.org ç´é˜µå æ™æ®Š ç‡•åæ¥æ—¶æ–°ç¤¾ï¼Œæ¢¨èŠ±è½åŽæ¸…明。 æ±ä¸Šç¢§è‹”三四点,å¶åº•é»„é¹‚ä¸€ä¸¤å£°ï¼Œæ— ¥é•¿é£žçµ®è½»ã€‚ 巧笑东邻女伴,采桑径里逢迎。 ç–‘æ€ªæ˜¨å®µæ˜¥æ¢¦å¥½ï¼Œå…ƒæ˜¯ä»Šæœæ–—è‰èµ¢ï¼Œç¬ ‘从åŒè„¸ç”Ÿã€‚ |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Got it, should quote it with mysql_escape_string first.
-- William http://williamxu.net9.org 临江仙 æ™å‡é“ æ¢¦åŽæ¥¼å°é«˜é”,酒醒帘幕低垂。 去年春æ¨å´æ¥æ—¶ã€‚ è½èŠ±äººç‹¬ç«‹ï¼Œå¾®é›¨ç‡•åŒé£žã€‚ è®°å¾—å°è‹¹åˆè§ï¼Œä¸¤é‡å¿ƒå—罗衣。 çµç¶å¼¦ä¸Šè¯´ç›¸æ€ã€‚ 当时明月在,曾照彩云归。 |
|
![]() |
| Outils de la discussion | |
|
|