本文介绍了PHP MYSQL 显示打开状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要修改此脚本以仅显示打开记录.字段称为 statusRP

I need to amend this script to only show Open records. Field is called statusRP

$result = mysql_query("select id, ref, company, title, forename,
                              surname, tel, fax, mob, statusRP, email 
                       from Client");

  if (!$result) {
      die("Query to show fields from table failed");
  }

   $fields_num = mysql_num_fields($result) ;

推荐答案

据我了解,

$result = mysql_query("select id, ref, company, title, forename, surname, tel, fax, mob, statusRP, email from Client WHERE Client.statusRP = 'Open'";) 

还有一件事,使用 mysqli 而不是 mysql(如果 mysql 不是您的要求).我认为它会起作用.

One more thing, Use mysqli rather then mysql (if mysql is not your requirement). I think it will be work.

这篇关于PHP MYSQL 显示打开状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 07:34