ufone Posted August 22, 2012 Share Posted August 22, 2012 thanks insert into dlyatten (code, date, type, category, scode, lCode, sec,syear ) ; select code, m.pDate, 1, "P", scode, lCode, Sec,ssyear ; from Student st ; WHERE Admtd = 1 ; AND NOT EXISTS (SELECT * FROM dlyatten dl ; WHERE dl.code = st.code AND date=pdate ) i want to use with sqlexec command Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/ Share on other sites More sharing options...
Barand Posted August 22, 2012 Share Posted August 22, 2012 remove the semi-colons Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1371490 Share on other sites More sharing options...
ufone Posted August 23, 2012 Author Share Posted August 23, 2012 thanks this portion of codes is working well. text to lcSQL noshow insert into dlyatten (code, date, type, category, scode, lCode, sec,syear ) values (?dcode,?ddate,1,'P',?dscode,?dlcode,?dsec,2012 ) endtext pDate = date() SQLExec(m.kpshandle, m.lcSQL) but this is not working AND NOT EXISTS (SELECT * FROM dlyatten dl WHERE dlyatten.code = studentaten.code AND dlyatten.date=m.pdate ) thanks Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1371721 Share on other sites More sharing options...
fenway Posted August 26, 2012 Share Posted August 26, 2012 What does 'not working' mean Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1372570 Share on other sites More sharing options...
ufone Posted August 27, 2012 Author Share Posted August 27, 2012 receive error here\ AND NOT EXISTS (SELECT * FROM dlyatten dl WHERE dlyatten.code = studentaten.code AND dlyatten.date=m.pdate ) Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1372927 Share on other sites More sharing options...
Barand Posted August 27, 2012 Share Posted August 27, 2012 Either remove the table alias or use it Link to comment https://forums.phpfreaks.com/topic/267423-convert-vfp-query-to-mysql/#findComment-1372936 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.