发布网友 发布时间:2022-05-01 19:53
共2个回答
懂视网 时间:2022-05-02 00:15
SELECT * FROM information_schema.columns WHERE table_schema=‘C17212451‘ AND table_name = ‘cinema_guide_appeal_detail‘ AND column_name = ‘suggest_instruction_content‘
MySQL判断字段是否存在
标签:content instr info mysql class from nbsp ges and
热心网友 时间:2022-05-01 21:23
不要用mysql_fetch_object()这个函数来判断,这个返回来的是个数组;一般情况下是这么来判断的:$query="select * from ".$tablepre."common_members"." where username ='".$_POST['reg_username']."'";$result=mysql_query($query,$link);$num = mysql_num_rows($result); //取得结果集中行的数目if($num){echo '<script type="text/javascript">alert("用户名已被占用 ,请重新输入!");location.replace("../reg/index.php");</script>';die();}