Hi All You will have to excuse my relatively simple question but i am new to playing with Sqlite and databases in general. I have a little app that is using PHP and Sqlite. I have had no troubles getting all the basics working but have hit a wall with the BLOB datatype. What i am trying to acheive is to store a sequence of bytes in my table. I am a little unsure about how to exactly store and retrieve that data. My confusion is coming from the fact that i have inherited this project from a previous employee who only just started the project and i cannot understand why he has done what he has done. My example is as: $sql= "CREATE TABLE users ( key INTEGER PRIMARY KEY, username BLOB, password BLOB, level BLOB);"; $result = $dbh->query($sql); for ($count=0;$count<$users_num;$count++) { $sql= "INSERT INTO users (key, username, password, level) VALUES ('".$count."', 'TEXT(21)||||||||', 'TEXT(21)||||||||', 'INTEGER|0|0|0|0|0|0|0');"; $result = $dbh->query($sql); }
I don't understand why he used the format he did to insert default values into the table. I have searched the net high and low and for the life of me i cannot find one example where someone did something like 'INTEGER|0|0|0|0|0|0|0'. If someone could help explain to me how i can access the "level" bytes and or update them that would be great. I simply dont know why he put the INTEGER into values. Thanks Steve. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users