PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table trip ( goid varchar(255), backid varchar(255) ); insert into trip (goid, backid) values ('EGLL', 'EGLL'); insert into trip (goid, backid) values ('VABB', 'VABB'); insert into trip (goid, backid) values ('KSEE', 'BHAS'); insert into trip (goid, backid) values ('EGNM', 'YSSY'); insert into trip (goid, backid) values ('OBMD', 'KSBD'); insert into trip (goid, backid) values ('EGLL', 'VABB'); SELECT goid, count(goid) FROM trip GROUP by goid; SELECT backid , count(backid ) FROM trip GROUP by backid; SELECT DISTINCT goid, backid FROM trip
Copy Clear
Copy Format Clear
<?php $itemid = 1; $id = 1; $prepared = $mysqli->prepare("SELECT * FROM testtable WHERE sFieldsID = ? AND uID= ?"); $prepared->bind_param('ii', $itemid, $id); $prepared->execute(); $success = $prepared->get_result(); if (mysqli_num_rows($success) == 0) { echo "No rows found"; } else { echo 'hello'; }
Show:  
Copy Clear