我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使用excel中的单引号将文件名插入mysql?

What can i do to insert file name with a single quotes from excel to mysql?
if I put the name without quotation, like this:

Andi

its working out, but if I put the name without quotation ( ' ), like this:

And'i

it didnt work. Please Help :(

you need to escape quotation character with a \ (backslash) character.

see here: http://dev.mysql.com/doc/refman/5.0/en/string-literals.html

also here for php: http://php.net/manual/en/function.mysql-real-escape-string.php

近期文章

  • 警告:openssl_pkcs7_sign()[function.openssl-pkcs7-sign]:在第8366行的C:\ xampp \ htdocs \ this \ tcpdf \ tcpdf.php中获取私钥时出错
  • 如何在php中集成ccavenue时在重定向url页面中获取orderid
  • 带有#符号的PHP表单,地址会导致url错误和未识别的索引
  • 关于jquery输出的数值如何传递到其他
  • 请问为什么二维数组输出sizeof(&a)是8呢?
  • python定义问题:如何定义?
  • 遗传算法求助!!救救可怜的孩子吧。
  • Everyone is No.1 代码编写
  • Cry,men,not crime 不太会写
  • Happy 2009
  • If You are my legend 是怎么编写的
  • PHP语句块中可以嵌入类似于( ?>HTML代码<?php )的东西?
  • Tears of lonely star 代码的问题
  • Samuel's Schedule
  • Getting Driving License 的问题
  • Easy Derivative 程序的设计
  • Greed is good 怎么写的
  • Linux Kernel Version 用代码的做法
  • Rank C语言来写
  • find the nearest station 写法

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华