如何使用c#中的其他参数将值从一个表插入到mysql中的另一个表中

时间:2015-09-26 03:03:17

标签: c# mysql

这是我的代码......

<header>  
  <div class="container top-sect">
    <div class="navbar-header">
      <h1 class="navbar-brand">
        <a  href="<?php echo site_url(); ?>"><?php bloginfo('name'); ?></a>
      </h1>
      <a class="search-form_toggle" href="#"></a>
    </div>

    <div class="help-box text-right">
      <p>Need help?</p>
      <a href="callto:#">800-2345-6789</a>
      <small><span>Hours:</span>  6am-4pm PST M-Th; &nbsp;6am-3pm PST Fri</small>
    </div>
  </div>


  <div id="stuck_container" class="stuck_container">
    <div class="container">   
    <nav class="navbar navbar-default navbar-static-top pull-left">            

        <div class="">  
          <ul class="nav navbar-nav sf-menu" data-type="navbar">
          <?php wp_list_pages(array('title_li' => '')); ?>
          </ul>

        </div>
    </nav>  
    <form class="search-form" action="http://static.livedemo00.template-help.com/wt_54725/search.php" method="GET" accept-charset="utf-8">
      <label class="search-form_label">
        <input class="search-form_input" type="text" name="s" autocomplete="off" placeholder=""/>
        <span class="search-form_liveout"></span>
      </label>
      <button class="search-form_submit fa-search" type="submit"></button>
    </form>

    </div>

  </div>  
</header>

1 个答案:

答案 0 :(得分:0)

使用此

newCmd.CommandText = @"insert into inventory(ItemNu,ItemName,BatchNo,Category,Unit,Supplier,ID,Qty,Location,ExpDate,MfdDate) select i.Number,i.ItemName,po.perchaseorderId,i.CatId,i.UniId,i.SupId,r.ID,'" + rqy + "','"+ exPdate +"','"+ mfDdate +"',' Inventory '
from porder po, request r,items i,supplier s, itemcategory ic
where po.PrNumber = r.PrNumbr and r.ItemNu = i.Number and s.SID=r.sup and ic.CID = r.cat and po.perchaseorderID = '" + PoNo + "'";