运动选项的类型是从我拥有各种运动类型的数据库中选择的。 Type_sport包含运动的名称。一切都很好,数据库中的所有体育都显示在选项列表中。但是,当我从数据库中选择选项时,我如何$ _REQUEST用户选择了哪种类型的运动? 表单中的代码如下所示:
do
$$
declare
_i text;
_r text;
begin
_i := '${table_1} + ${table_2} + ${table_3}';
_r := (
with u as (select * from unnest(string_to_array(_i,'+')) with ordinality t(e,o))
, c as (select format('TMP_%s AS (SELECT date, quantity FROM %I)'
, o
, substring(unnest(string_to_array(e,'+')) from '\{(.+)\}')
) from u
)
select string_agg(format,','||chr(10)) from c);
_r := 'WITH '||chr(10)||_r||chr(10)||$s$SELECT time_bucket('1 day', date) AS date,
sum(quantity) AS sum FROM
(
SELECT date, quantity FROM TMP_1
UNION ALL
SELECT date, quantity FROM TMP_2
UNION ALL
SELECT date, quantity FROM TMP_3
) AS res_1
GROUP BY 1
ORDER BY 1;$s$;
raise info '%',_r;
execute _r;
end;
$$
;
我尝试过: <p>Choose sport: </p>
<form action="page2.php" method="post">
<select name="sports">
<option>Choose sport</option>
<?php
$db=mysqli_connect("xxxxxxxx","xxxxx","","xxxxx");
$sql="Select* from sports";
$result=mysqli_query($db,$sql);
$numberOfRows=mysqli_affected_rows($db);
for($i=0;$i<$numberOfRows;$i++){
$row=mysqli_fetch_array($result);
echo "<option> ".$row["type_sport"]."</option>";
}
?>
</select>
</form>
但它不起作用。
`
答案 0 :(得分:1)
您需要为选项标记提供一个值属性,这是您从请求超级全局it('should load the school results in less than 1s', () => {
searchPage.navigateTo();
browser.waitForAngularEnabled(false);
searchPage.search('col');
browser.wait(EC.visibilityOf(searchPage.results), 1000);
expect(searchPage.resultLinks.count())
.toBeGreaterThan(0);
});