Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
<?php $conn = mysqli_connect('localhost', 'admin', '', 'test'); $rs = mysqli_query($conn, "select count(*) cnt from table where field3 = 8"); $row = mysqli_fetch_assoc($rs); $cnt = $row['cnt']; $middle = ceil($cnt/2); $var1 = 'string1'; $var2 = 'string2'; mysqli_query( $conn, "update table a, (SELECT @rownum:=0) b set article = concat(article, if((@rownum := @rownum+1) > $middle, '$var1', '$var2')) where field3 = 8 " ); ?>
$var1 = 'string1'; $var2 = 'string2';
//If cnt was 10 for example... $var1 = 'string1a'; $var2 = 'string2a';
//then generate another 2 values... $var1 = 'string1b'; $var2 = 'string2b';
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.