douzhang5984 2010-07-28 21:25
浏览 47
已采纳

什么mysqli函数使用而不是mysql?

This will probably sound pretty dumb. I've got a mysql function containing the following...

@mysql_connect()

@mysql_select_db($databaseName,$link);

mysql_query($sql,$link);

mysql_error()

mysql_fetch_array($result,MYSQL_ASSOC)

mysql_num_rows($result)



Can I just bung an i after mysql like this...


@mysqli_connect

mysqli_query($link, $sql);

mysqli_error($link)."]";

mysqli_fetch_array($result,MYSQLI_ASSOC))

mysqli_num_rows($result);

The first two I know are ok but what about the others? I'm not sure those functions actually exist as straight swap mysqli versions. Can't seem to find much info about them.

What would there mysqli equivilent be?

Can I just use mysqli_connect and mysqli_query but use the old mysql functions for the others? Do they work together like that

  • 写回答

2条回答 默认 最新

  • douyi5157 2010-07-28 21:28
    关注

    Here is the "book" area of the PHP manual showing you EVERY mysqli function available. Your assumption is pretty much correct, a lot of the naming convention applies with just adding 'i' but to be sure that it exists, take a peak here: http://php.net/manual/en/book.mysqli.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?