Jump to content

Help me query please


jantichap

Recommended Posts

select luser.userid,luser.firstname,luser.lastname from luser

where luser.Pos = \'Teacher\'and luser.userid not in

(select sectionuser.userid from sectionuser

where sectionuser.courseid = \'204105\'and sectionuser.SectionID = \'1\' and sectionuser.Semester = \'2\')

ORDER BY luser.UserID

 

this query i can use in other database server but i can\'t use in MySQL version 4.0.2-alpha-nt

 

please!!! help me to convert my query can use in MySQL ....thank

Link to comment
https://forums.phpfreaks.com/topic/24-help-me-query-please/
Share on other sites

A few typos, try:

 


SELECT luser.userid,luser.firstname,luser.lastname 

FROM luser

WHERE (luser.Pos = \'Teacher\') 

AND 

(

  luser.userid NOT IN

   (

   SELECT sectionuser.userid 

   FROM sectionuser 

   WHERE 

   (sectionuser.courseid = \'204105\') 

   AND

   (sectionuser.SectionID = \'1\') 

   AND 

   (sectionuser.Semester = \'2\') 

   )

)

ORDER BY luser.UserID 

 

Try it,

P., denmark

 

select luser.userid,luser.firstname,luser.lastname from luser  

where luser.Pos = \'Teacher\'and luser.userid not in  

(select sectionuser.userid from sectionuser  

where sectionuser.courseid = \'204105\'and sectionuser.SectionID = \'1\' and sectionuser.Semester = \'2\')  

ORDER BY luser.UserID  

 

this query i can use in other database server but i can\'t use in MySQL version 4.0.2-alpha-nt  

 

please!!! help me to convert my query can use in MySQL ....thank

Link to comment
https://forums.phpfreaks.com/topic/24-help-me-query-please/#findComment-62
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.