Project / Support Center
Welcome, Guest. Please login or register. November 28, 2023, 09:00: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: MYSQL selecting or showing record based on 2 different values in the same field 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: MYSQL selecting or showing record based on 2 different values in the same field  (Read 1178 times)
admin
Administrator
******
Offline Offline

Posts: 239


« on: May 15, 2023, 03:31: PM »

USE the OR attribute

Tells the query to look for this OR that value

SELECT *
FROM status_options_various
WHERE menu_group = 8 (this)
OR menu_group = 9 (that)

This will combine the output together and show both


To select values from 2 different fields use the AND attribute - Select This AND This

SELECT *
FROM status_options_various
WHERE menu_group = 8 (this)
AND menu_tax = 9 (this)
« Last Edit: May 15, 2023, 03:39: PM by admin » Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  MySQL  |  Topic: MYSQL selecting or showing record based on 2 different values in the same field « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!