|
查看: 1139|回复: 6
|
PHP ,请高手帮我解答。。
[复制链接]
|
|
|
$getStudent6 = "SELECT studentID,Username, studentCourse, studentIntake, studentMajor FROM student ";
$getStudent6 .= "WHERE studentCourse = '$_POST[Course]' AND studentID = '$_POST[txtID]' AND username = '$_POST[txtName]' AND studentintake = '$_POST[txtintake]' AND studentMajor = '$_POST[txtmajor]'" ; -----------〉有人知道 .= 是拿来什么吗??
$getStudent6Result = mysql_query($getStudent6,$conn) or die(mysql_error());
{
$displayStudent = "
";
while($getStudentArray = mysql_fetch_array($getStudent6Result))
{
$dbstudentID6 = $getStudentArray['studentID'];
$dbUsername6 = $getStudentArray['Username'];
$dbstudentCourse6 = $getStudentArray['studentCourse'];
$dbstudentIntake6 = $getStudentArray['studentIntake'];
$dbstudentmajor6 = $getStudentArray['studentMajor'];
$displayStudent .= "
etc etc etc............. |
|
|
|
|
|
|
|
|
|
|
发表于 28-8-2009 04:39 PM
|
显示全部楼层
|
应该与 $getStudents = $getStudents6 + "Where xxxx" 一样 |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 28-8-2009 07:42 PM
|
显示全部楼层
有点乱。。
你的意思是 $getStudents6 + WHERE +++
就是这?? $getStudents = $getStudents6**(SELECT studentID,Username, studentCourse, studentIntake, studentMajor FROM student)** + "Where xxxx" |
|
|
|
|
|
|
|
|
|
|
发表于 30-8-2009 04:28 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 1-9-2009 04:44 PM
|
显示全部楼层
对。。。concat string 的意思。。。
相信楼上的帮您解决了 |
|
|
|
|
|
|
|
|
|
|
发表于 3-9-2009 11:01 AM
|
显示全部楼层
因为你把一个要连在一起的query分成两个就要用.=了
比方说$getStudent = "abc"."def" 那个.是用来把两个东西加起来
这样说你会明白吗?? |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 3-9-2009 05:19 PM
|
显示全部楼层
谢谢各位。。。。。 |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|