Hej,
Jag behöver hjälp av någon kunnig att göra om en kod till classic asp. Tacksam på förhand
Kod:
<?php include('db.php'); if($_POST) { $q = mysqli_real_escape_string($connection,$_POST['search']);  
  $strSQL_Result = mysqli_query($connection,"(SELECT `aid`, `aname` FROM `tb_artists` WHERE `aname` LIKE '%$q%' LIMIT 0, 5) UNION (SELECT `sid`, `sname` FROM `tb_songs` WHERE `sname` LIKE '%$q%' LIMIT 0, 5)");     while($row=mysqli_fetch_array($strSQL_Result)) { $songname = $row['sname']; $artist = $row['aname']; $b_songname = '<strong>'.$q.'</strong>'; $b_artist = '<strong>'.$q.'</strong>'; $final_songname = str_ireplace($b_username, $b_songname, $songname); $final_artist = str_ireplace($b_artist, $b_artist, $artist);   § ?> <div> <?php echo $final_songname; ?></span> <br/><?php echo $final_artist; ?><br/> </div>
<?php } } ?>
|