Berkeley CSUA MOTD:2006:June:17 Saturday <Friday, Sunday>
Berkeley CSUA MOTD
2006/6/17-21 [Computer/SW/Languages/Misc, Computer/SW/Languages/Web] UID:43423 Activity:nil
6/17    dbushong and php xml gurus, thanks so much for your help! I don't
        know what I'd do without you guys. Google and are clearly
        _insuperior_ than the motd. Anyways I have just a few more question.
          What's the proper way to embed text and binaries into XML? Should
        I simply call htmlspecialchars() on each item or just HEX it? Second
        question is, if I let users do "SELECT *" and want to return as
        XML how do I check the mySQL type for each field(column) name? I
        tried using mysql_field_type(...) but when it sees a TEXT field, it
        returns it as a BLOB, wtf?
        \_ "insuperior than"?
        \_ Putting binary data in XML sucks.  You'll have to basically &#NNN;
           every out-of-charset byte.  Probably best to just base64_encode() it
           and throw that into the entity.  TEXT columns are BLOB columns, they
           just are searched differently, essentially (case insensitive, respect
           charset, yadda).  I don't know the PHP way to do introspection on
           your table, offhand, but you could always parse the result of
           DESC table or SHOW CREATE TABLE table.  --dbushong
2006/6/17-21 [Transportation/Car, Transportation/Bicycle] UID:43424 Activity:nil
6/17    Are Mavic Aksium wheels better than Shimano R540 wheels?
Berkeley CSUA MOTD:2006:June:17 Saturday <Friday, Sunday>