当前位置: 首页>>代码示例>>PHP>>正文


PHP connection::ExecuteQuery方法代码示例

本文整理汇总了PHP中connection::ExecuteQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP connection::ExecuteQuery方法的具体用法?PHP connection::ExecuteQuery怎么用?PHP connection::ExecuteQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在connection的用法示例。


在下文中一共展示了connection::ExecuteQuery方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

						<li id="menu_active"><a href="http://ec2-52-69-89-129.ap-northeast-1.compute.amazonaws.com/site/index.html">Home</a></li>
						<!--<li><a href="Mission.html">Our Mission</a></li> -->
						<!--<li><a href="News.html">About us</a></li> -->
						<!--<li><a href="Help.html">How to Help</a></li> -->
						<li><a href="Contact.html">Contact</a></li>
					</ul>
				</nav>
			</div>
			

			<table>
			<form action="survey.php" method="post" role="form" name="f1">
              
             <h3> <tr> <td>School Name: </td> <td> </h3><select name="school">
			<?php 
$SqlContent = $Dbcon->ExecuteQuery("select school_name from school_info s,city c,users u where s.city_id=c.city_id and u.city=c.city_name");
$totalrows = $Dbcon->NumRows($SqlContent);
while ($totalrows = $Dbcon->FetchArray($SqlContent)) {
    ?>


			

			<p class="small-paragraph">
				<option value="<?php 
    echo $totalrows['school_name'];
    ?>
"><?php 
    echo $totalrows['school_name'];
    ?>
 </option>
开发者ID:T4SG,项目名称:Mumbai-Team-16,代码行数:31,代码来源:login.php

示例2: connection

echo "at the start";
include "config.inc.php";
$Dbcon = new connection();
$Dbcon->localarea();
$schoolname = $_POST["school"];
$schoolauth = $_POST["schoolauth"];
$disasteraffected = $_POST["dis"];
$numberofstudents = $_POST["no"];
$studentpop = $_POST["pop"];
$dest = $_POST["dest"];
$comm = $_post["2"];
$amount = $_POST["amt"];
$constcost = $_POST["cost"];
$newresource = $_POST["newreso"];
$prone = $_POST["prone"];
$value = $disasteraffected * 5 + $numberofstudents / $studentpop * 4 + $dest * 3 + $newresource * 2 + $prone;
if (isset($_POST["submit"])) {
    echo "inside submit";
    $SqlContent1 = $Dbcon->ExecuteQuery("insert into survey values('','schoolname','{$schoolauth}','{$disasteraffected}','{$numberofstudents}',\n\t\t'{$studentpop}','{$dest}','{$comm}','{$constcost}','{$newresource}','{$prone}','{$amount}','{$value}')");
    if ($SqlContent1) {
        echo "Your response has been recorded. Thank you.";
        mail("rachitadevakumar@gmail.com", "My subject", "Your response");
    } else {
        echo "Sorry! Your response could not be recorded.";
    }
} else {
    echo "No submit";
}
?>
</body>
</html>
开发者ID:T4SG,项目名称:Mumbai-Team-16,代码行数:31,代码来源:survey.php

示例3:

  <table class="table">
    <thead>
      <tr>
        <th>#</th>
        <th>SCHOOL NAME</th>
    
      <th>CONSTRUCTION COST</th>
      
      <th>AMOUNT BY COMMUNITY</th>
      
      <th>TOTAL FUNDS REQUIRED</th>
      </tr>
    </thead>
    <tbody>
<?php 
$SqlContent = $Dbcon->ExecuteQuery("select school_name,construction_cost,amount from survey ORDER BY calc_value desc");
$totalrows = $Dbcon->NumRows($SqlContent);
$i = 1;
while ($totalrows = $Dbcon->FetchArray($SqlContent)) {
    ?>
      <tr>
        <td><?php 
    echo $i;
    ?>
</td>
        <td><?php 
    echo $totalrows['school_name'];
    ?>
</td>
        <td><?php 
    echo $totalrows['construction_cost'];
开发者ID:T4SG,项目名称:Mumbai-Team-16,代码行数:31,代码来源:report.php


注:本文中的connection::ExecuteQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。