我正在使用这段代码,我想只是那些字段没有空,如果任何字段为空则不能从我的sql server打开图像,
$Query = "SELECT * FROM movie_post WHERE id=$id AND NOT IS NULL(linkfrom2,m_link2,linkfrom3,m_link3,linkfrom4,m_link4,linkfrom5,m_link5)";
答案 0 :(得分:0)
你可能意味着这样的事情:
$query = "SELECT * FROM movie_post WHERE id=$id AND linkfrom2 IS NOT NULL AND m_link2 IS NOT NULL AND linkfrom3 IS NOT NULL AND m_link3 IS NOT NULL AND linkfrom4 IS NOT NULL AND m_link4 IS NOT NULL AND linkfrom5 IS NOT NULL AND m_link5 IS NOT NULL";
我不知道写这句话的简短方法。