Search notes:

SQLite function: hex

hex(val) returns a hexadecimal representation of the internally stored bytes for val.
create table h (
  col
);

insert into h values ( 'a'       );
insert into h values ( 'ä'       );
insert into h values ( 'foo'     );
insert into h values (x'deadbeef');
insert into h values (  null     );
insert into h values (  42       );
insert into h values (  9.9      );

.mode column
.width 14 10

select
   quote(col),
   hex(col)
from
   h;
--
--  'a'             61        
--  'ä'             C3A4          <-- c3 a4 is utf8 for ä
--  'foo'           666F6F    
--  X'DEADBEEF'     DEADBEEF  
--  NULL                      
--  42              3432      
--  9.9             392E39
Github repository about-sqlite, path: /functions/hex.sql

See also

quote(val)
functions
The blob datatype.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758203932, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQLite/functions/hex(74): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78