当前位置:网站首页>PHP MySQL where clause
PHP MySQL where clause
2022-07-03 17:51:00 【Crooning ~ shallow singing】
WHERE Clause
WHERE Clause is used to extract records that meet the specified criteria .
grammar
SELECT column_name(s) FROM table_name WHERE column_name operator value
To learn more about SQL Knowledge , Please visit our SQL course .
In order to make PHP Execute the above statement , We have to use mysqli_query() function . This function is used to send a message to MySQL Connect to send queries or commands .
example
The following example will start from "Persons" Select all in the table FirstName='Peter' The line of :
<?php
$con=mysqli_connect("localhost","username","password","database");
// Detection connection
if (mysqli_connect_errno())
{
echo " The connection fails : " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM Persons
WHERE FirstName='Peter'");
while($row = mysqli_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
echo "<br>";
}
?>The above code will be output :
Peter Griffin
边栏推荐
- QT adjust win screen brightness and sound size
- First day of rhcsa study
- Kotlin的協程:上下文
- [combinatorics] recursive equation (the problem of solving recursive equation with multiple roots | the problem is raised)
- List的stream中Long对象与long判等问题记录
- Baiwen.com 7 days Internet of things smart home learning experience punch in the next day
- Design limitations of structure type (struct)
- How to deploy applications on kubernetes cluster
- TCP拥塞控制详解 | 3. 设计空间
- Play with fancy special effects. This AE super kit is for you
猜你喜欢

1164 Good in C

vs2013已阻止安装程序,需安装IE10

QT学习日记9——对话框

IntelliJ 2021.3 short command line when running applications

Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028

Talk about the design and implementation logic of payment process

TensorBoard快速入门(Pytorch使用TensorBoard)

Cloud primordial weekly | CNCF released the 2021 cloud primordial development status report, which was released on istio 1.13

Wechat applet for the first time

一入“远程”终不悔,几人欢喜几人愁。| 社区征文
随机推荐
Research Report on investment trends and development planning of China's thermal insulation material industry, 2022-2028
Life perception 1
远程办公工具分享|社区征文
STM32实现74HC595控制
Investigation on the operation prospect of the global and Chinese Anti enkephalinase market and analysis report on the investment strategy of the 14th five year plan 2022-2028
List的stream中Long对象与long判等问题记录
[combinatorics] recursive equation (special solution example 1 Hannover tower complete solution process | special solution example 2 special solution processing when the characteristic root is 1)
Analysis report on production and marketing demand and investment forecast of China's PVC industry from 2021 to 2026
Keepalived setting does not preempt resources
OpenSSL的SSL/BIO_get_fd
Create a new file from templates with bash script - create new file from templates with bash script
Draw some simple graphics with MFC
Brief introduction to the core functions of automatic penetration testing tool
Select 3 fcpx plug-ins. Come and see if you like them
AcWing 3438. Number system conversion
Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
QT learning diary 9 - dialog box
1147_ Makefile learning_ Target files and dependent files in makefile
Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
i++与++i的区别:通俗易懂的讲述他们的区别