如何使用php搜索数据库 [英] How to search database using php

查看:131
本文介绍了如何使用php搜索数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我有一个问题我需要在我的数据库中搜索注册号..问题是我在该数据库中有2个表,如cd和sd ..我该如何搜索?

i已经有了一个想法,它使用文本框和组合框和一个提交按钮,但我不知道如何实现它..请帮助我guyz谢谢


这里是表格

hi i have a problem i need to search my database for the registration number..the problem is i have 2 tables in that database such as cd and sd.. how can i search it?

i already have an idea its using textbox and combobox and a submit button but i dont how to implement it..please help me guyz thanks

here is the form

展开 | 选择 | Wrap | 行号

推荐答案

事实上,您使用数据库在数据库中搜索(相反,它的语言SQL)。 PHP只是将用户输入转换为SQL并将返回的DB数据转换为(可读)HTML。
as a matter of fact, you search in a database by using the database (resp. its language SQL). PHP is only there to transform the user input into SQL and the returned DB data into (readable) HTML.


有任何想法如何使用下拉菜单,组合搜索我的数据库盒子?我真的被困在这里...
have any idea how can i search my database with a use of dropdown menu, combo box?i''m really stuck in here dude..


从头开始搜索数据库是很多代码,你知道吗?并且根据每个部分的外观(至少有HTML,CSS,PHP,SQL(不要忘记数据库布局)和可能的JavaScript),它可以变得非常少。
searching a DB from scratch is a lot of code, you know? and depending on how each part looks (you have at least HTML, CSS, PHP, SQL (not to forget the DB layout) and possibly JavaScript), it can become quite a handful.


这篇关于如何使用php搜索数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆