473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to change a field content in a database for the search engine

10
hello

I am doing a search engine for a library and I would like to offer the users the possibility of choosing a kind of document (video, audio, music sheet...) thanks to a check box . But the problem is that the kind of document in the database MySQL is named by an abbreviation (like "AV" for a a Video), which should not be seen on the result page. I would like that the full name "Video" is seen on the result page instead.
But I canīt find out how I can write that code.

I wrote that but it doesnīt work
Expand|Select|Wrap|Line Numbers
  1. if($_POST[`docī]=="Video") {$sql="SELECT Tipo_de_documento FROM tablabu LIKE "AV") }
[Please use CODE tags when posting source code. Thanks! --pbmods]

Thanks for your help
Jun 20 '07 #1
2 1254
pbmods
5,821 Expert 4TB
You posted this in the PHP Articles forum. I'll go ahead and move it to the PHP Forum so that you'll get some responses....
Jun 21 '07 #2
pbmods
5,821 Expert 4TB
Heya, Phaelle.

Expand|Select|Wrap|Line Numbers
  1. if($_POST[`docī]=="Video") {
  2.     $sql="SELECT Tipo_de_documento FROM tablabu LIKE "AV")
  3. }
You'll be wanting to change that to:

Expand|Select|Wrap|Line Numbers
  1. $sql = "SELECT `Tipo_de_documento` FROM `tablabu` WHERE `docTypeOrWhateverYouCalledIt` = 'AV'";
  2.  
Using LIKE is overkill, and you need to match against a field name. Also, you will want to put single quotes around 'AV' because you're using double quotes to set the value of $sql.
Jun 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ian N | last post by:
Hi, I've created a basic Content management System that i use to maintain my website. However i'm having promblems with getting the site ranked on search engines, presumably as it's all...
8
by: Stromboli | last post by:
Hi, I have my site available in a couple of languages most of the files are indexf.html (french), indexi.html (italian) and indexde.html (german).. I'd like to start using multiviews but I've...
0
by: htmlgeek | last post by:
I'm adding and updating records in an Access .mdb via WWW .asp page. Authored in Dreamweaver 2004 MX. Help is welcome on this one. I have a great set of pages that work fine, but it seems that...
0
by: TaeHo Yoo | last post by:
After running my code, group tree(the left section of the report) changes but not the content in the report. My code is ---------------------------------------------------------- Private Sub...
2
by: Jennyfer J Barco | last post by:
Hello, I have the following: <HEAD id="ENGINE"> <title>WebBase.NET Engine</title> <meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR"> <meta content="Visual Basic 7.0"...
64
by: Manfred Kooistra | last post by:
I am building a website with identical content in four different languages. On a first visit, the search engine determines the language of the content by the IP address of the visitor. What the...
5
by: justobservant | last post by:
When more than one keyword is typed into a search-query, most of the search-results displayed indicate specified keywords scattered throughout an entire website of content i.e., this is shown as...
1
by: Sheau Wei | last post by:
i want to make a search engine for may database. i want to make the radio option at the search engine, but how to handle the search at the radio and the text field
3
by: sql | last post by:
I am developing a Content Management System in ASP .NET with a SQL Server database. The main content is stored as HTML (still not sure if this is the way to go yet!) so that it is displayed on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.