Technical Issues => MySQL => Topic started by: admin on May 15, 2023, 03:31: PM

Title: MYSQL selecting or showing record based on 2 different values in the same field
Post by: admin 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)
Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is missing the copyright message for SMF so they can rectify the situation. Display of copyright is a legal requirement. For more information on this please visit the Simple Machines website.