Hi,

I'm following the example here :-

http://forums.mysql.com/read.php?52,138724,138727#msg-138727


I've been designing a SELECT query on two tables.. -It seems to be
working... But i want to confirm its correct before I do any UPDATE
commands


$query = "
    SELECT q.question_id, q.question_text, q.is_approved, q.language
    FROM questions AS q
    LEFT JOIN questions_categories AS qc ON qc.question_id = q.question_id
    WHERE qc.question_id IS NULL";

Basically, Ive got 2 tables...

q =  Question ID,  Text/title of question, approved (online) or not,
and language...

qc = a question ID, and a category...

my query produces 2 results (out of 2 records)

Basically, I want to check the category database, & find all questions
IN the questions table, but not in the category table...

& if so - set / add a new record in the categories database for the
question, & category '1'


Does my query look OK??

PS - I do NOT have phpmysqladmin access (or whatever it is called)...
- So I cant check the tables directly etc...& confirm visually...



-- 
G
NZ community groups - [EMAIL PROTECTED]
Freecycle Auckland :-
http://groups.yahoo.com/group/AucklandFreecycle/

Reply via email to