我无法将会话中的一系列项目保存到mysql数据库中,并报错:
A = nx.nx_agraph.to_agraph(G) # convert to a graphviz graph
A.layout(prog='dot') # neato layout
#A.draw('test3.pdf')
A.draw('test3.png',args='-Gnodesep=0.01 -Gfont_size=1',prog='dot' )
当我做一个dd(Dump and Die)时,数组显示如下:
"Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function save() on string"
以下是控制器存储功能:
"{"1":{"name":"Bajiya","quantity":4,"price":"34.00"},"2":{"name":"Gulha","quantity":2,"price":"3.00"},"3":{"name":"kavaabu","quantity":1,"price":"2.00"}}"
我的数据库中有一个表,其中包含ID和购物车列。我希望将上面的数组保存在购物车列中。
谢谢