Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

ring MySQL Restore Image From The Database

con = mysql_init()
See "Connect to database..." + nl
mysql_connect(con, "localhost", "root", "root","mahdb")
See "Read data from database..." + nl
mysql_query(con,"SELECT data FROM photo WHERE id=1")
See "Write new file" + nl
result = mysql_result(con)
write("testsmahmoud2.jpg",result[1][1])
See "Close database..." + nl
mysql_close(con)
Source by ring-lang.github.io #
 
PREVIOUS NEXT
Tagged: #ring #MySQL #Restore #Image #From #The #Database
ADD COMMENT
Topic
Name
5+3 =