如何使用INNER JOIN插入数据?

时间:2017-05-09 19:35:20

标签: mysql sql-insert

网站上的用户可以撰写文章并添加与文章相关的照片。

这两个表格如下:

ve_articles

<settings>
<proxies>
  <proxy>
    <id>http</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>myhost</host>
    <port>my_post</port>
  <proxy>
  <proxy>
    <id>http</id>
    <active>true</active>
    <protocol>http2</protocol>
    <host>myhost</host>
    <port>my_post</port>
  <proxy>
</proxies>
</settings>

ve_articles_images

ARID | UsersId | CtaegoryId | ArticleName | ArticleText |Time

查询

PhotoID | UserID | PhotoPath | Extension | ArticleID | InsertDate

注意ve_articles如何与Article_images一起加入ArticleID?但如果我的文章ID在插入之前是未知的,我怎样才能插入附在文章上的图像?

0 个答案:

没有答案