Changeset 91 for handler-socket-client-php/handler_socket.php
- Timestamp:
- 12/20/2010 06:49:13 AM (15 years ago)
- File:
-
- 1 edited
-
handler-socket-client-php/handler_socket.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
handler-socket-client-php/handler_socket.php
r90 r91 5 5 * // Tested with source compiled MySQL 5.1.54 and ahiguti-HandlerSocket-Plugin-for-MySQL-c865c53 6 6 * $hs = new handler_socket( '127.0.0.1', 9998, 9999 ); 7 * $hs->index( 'tesst_db', 'test_table', 'PRIMARY', array('col1','col2','col3') ); 8 * // Works as expected in my testing 7 * // Works with InnoDB and MyISAM 8 * $hs->index( 'test_db', 'test_table', 'PRIMARY', array('id','name','code') ); 9 * // Works with InnoDB 10 * $hs->insert( 'PRIMARY', array( 1, 'FOO', 'F@' ) ); 11 * // Works with InnoDB and MyISAM 9 12 * $results = $hs->select('PRIMARY', '=', 1 ); 10 * // Doesn't work as expected (reports success, corrupts column, repair table then drops the column) 11 * $hs->insert( 'PRIMARY', array( $col1, $col2, $col3 ) ); 12 * // This does't work as expected (reports success, adds corrupted column, repair table drops the column) 13 * $hs->update( 'PRIMARY', '=', 1, array( $col1, $col2, $col3 ) ); 14 * // Works as expected 13 * // Works with InnoDB 14 * $hs->update( 'PRIMARY', '=', 1, array( '1', 'FOO UPDATED AT '.time() ) ); 15 * // Works with InnoDB and MyISAM 15 16 * $hs->delete( 'PRIMARY', '=', 1 ); 16 17 * … … 110 111 111 112 /* 112 * Update via comparison against a defined index (note: right now just seems to corrupt tables)113 * Update via comparison against a defined index 113 114 * 114 115 * @param $key string the defined index you wish to use, use "PRIMARY" fpr the primary key … … 140 141 return $this->parse_response( $this->query( 'write', $request ), true ); 141 142 } 143 142 144 /* 143 * Insert into a given table, using the key as a reference (note: right now just seems to corrupt tables)145 * Insert into a given table, using the key as a reference 144 146 * 145 147 * @param $key string the defined index you wish to use, use "PRIMARY" fpr the primary key
Note: See TracChangeset
for help on using the changeset viewer.
