mysql - LOAD DATA LOCAL INFILE skips html tags inside <> -


i have file this

myfile.tpl

{if !$smarty.action}     <div id="bar"> {/if} .... 

i using command loading file mysql table

create table mytable (col text); load data local infile 'myfile.tpl'  table mytable fields terminated '' enclosed '' escaped '' lines terminated '\n' starting '' 

when use select * mytable 1 result is:

{if !$smarty.action} {/if} 

and skips <div id="bar"> in output.

followed same steps yours:

myfile.tpl has below contents

{if !$smarty.action}     <div id="bar"> {/if} 

create table

create table mytable (col text); 

loading data

load data local infile 'd:\\so_test\\myfile.tpl'  table mytable  fields terminated '' enclosed '' escaped ''  lines terminated '\n' starting '' 

viewing data returns

select * mytable 

enter image description here

mysql version running

show variables "%version%"  'innodb_version', '5.6.17' 'version', '5.6.17' 

Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -