- Joined
- Sep 10, 2002
- Messages
- 5,834
- Reaction score
- 75
I have a field name contentdata with a hex data of AA560D72DA4AB20AAA using a type char.
In MySQL, I can run this command:
SELECT SUBSTR(hex(contentdata),15,2) FROM table1
the output is:
0A
How can I code "SELECT SUBSTR(hex(contentdata),15,2) FROM table1" in PHP so I can bring the same result.
MySQL create php code gave me this recommendation but I can't show the value.
$sql = "SELECT SUBSTR(hex(payload),15,2) FROM device_status LIMIT"
Let me know what I'm missing here?
Thanks in advance.
Em
In MySQL, I can run this command:
SELECT SUBSTR(hex(contentdata),15,2) FROM table1
the output is:
0A
How can I code "SELECT SUBSTR(hex(contentdata),15,2) FROM table1" in PHP so I can bring the same result.
MySQL create php code gave me this recommendation but I can't show the value.
$sql = "SELECT SUBSTR(hex(payload),15,2) FROM device_status LIMIT"
Let me know what I'm missing here?
Thanks in advance.
Em