-
php程序中调用mysql存储过程实例
[PHP教程] 2022-02-17 13:01:10 106人阅读
php与mysql本来就是天生的一对了,下面我来介绍在php程序中怎么调用在mysql中己经写好的存储过程,大家一起来看看具体实现方法. Mysql存储过程创建语法,代码如下: CREATE PROCEDURE和CREATE FUNCTION CREATE PROCEDURE...[详细]
-
PHP利用XML备份MySQL数据库实例
[PHP教程] 2022-02-17 13:00:54 197人阅读
本文章来给大家介绍一个PHP利用XML备份MySQL数据库实例,这种方法个人认为只适用小数据量,并且安全性要求不高的用户了. 以下是在Linux下通过Apache+PHP对Mysql数据库的备份的文件代码. 文件一、Listtable.php,文件列...[详细]
-
php mysqli批量替换数据库表前缀实例
[PHP教程] 2022-02-17 13:00:37 198人阅读
在php中有时我们要替换数据库中表前缀但是又不苦于一个个表去修改前缀吧,下面我自己写了一个mysqli批量替换数据库表前缀的php程序,希望些方法对你有帮助,代码如下: ?php header ( http-equiv=Content-Type content=t...[详细]
-
php连接不上MySQL问题解决办法
[PHP教程] 2022-02-17 13:00:12 176人阅读
php连接不上mysql的原因有很多种常用的可能是函数没开启或mysql数据库配置有问题,下面我来给大家介绍php连接不上MySQL一些问题的分析与解决方法. 现象1 在PHP error log里发现:PHP Warning: mysqli::mysqli(): (HY00...[详细]
-
php生成excel列名,超过26列大于Z问题解决办法
[PHP教程] 2022-02-17 12:59:51 99人阅读
我们生成excel都会使用phpExcel类了,下面我来给大家介绍在生成excel列名超过26列大于Z问题解决办法吧,这是phpExcel类中的方法,今天查到了,记录一下备忘,代码如下: public static function stringFromColumnIndex($pC...[详细]
-
一个简单php数据库备份程序
[PHP教程] 2022-02-17 12:59:30 172人阅读
php备份mysql数据库是很多个人站长网站所具备的功能,当然如果你要备份几个GB或更大的数据库时php备份方法感觉有点吃力了. PHP 备份 mysql 数据库的源代码,在完善的 PHP+Mysql 项目中,在后台都会有备份 Mysql 数据库...[详细]
-
php随机取mysql记录方法示例
[PHP教程] 2022-02-17 12:59:03 88人阅读
在php中要随机取mysql记录我们可以直接使用mysql_query来执行mysql中的select rand函数获取的数据并读出来,下面我来给大家介绍一下具体实例. 方法一,代码如下: select * from tablename order by rand() limit 1 把 ...[详细]
-
PHP Mysql数据库备份类程序总结
[PHP教程] 2022-02-17 12:57:08 104人阅读
数据库备份类我们只要在网上一搜索在N多的类代码,下面我来总结几款不错数据库备份希望对大家有所帮助. 数据库备份类,使用方法,代码如下: require_once(backdata.class.php); $link = @mysql_connect(localhost,数据...[详细]
-
PHP里实现mysql连接与查询实例解析
[PHP教程] 2022-02-16 16:51:54 76人阅读
在网上看了很多教程都是只讲到了一部份,如果连接数据库就只写了连接数据或查询只有查询,下面这文章从php 配置mysql连接然后到查询数据实例. 下面讲一下PHP链接MYSQL数据库,PHP与mysql链接和查询全过程 1、配置:php.i...[详细]
-
PHP把mysql数据库导出为excel表
[PHP教程] 2022-02-16 16:51:17 171人阅读
利用php导出mysql数据库为excel表格的方法很多,最简单的就直接使用php fputcsv函数了,还有就是直接输入csv格式也是可以了,要生成excel标准格式我们需使用第三方插件了. 方法一,利用fputcsv,代码如下: // 输出Excel文...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]