"> ">
Download presentation
Presentation is loading. Please wait.
Published bySusanti Tedjo Modified over 6 years ago
1
Instrucțiunile .php pentru conectarea, interogarea și manipularea datelor de pe sisteme de calcul x64 care rulează o versiune de WampServer pot fi următoarele:
2
Conectivitatea la BD <?php $host="localhost"; $username="root";
$password=""; $db_name="______"; $con = mysqli_connect("$host", "$username", "$password", "$db_name"); if(mysqli_connect_errno()) echo "Failed to connect to MySQL: ".mysqli_connect_error(); ?>
3
Exemplu interogare $q0 = "SELECT * FROM emp ORDER BY job, ename"; $result = mysqli_query($con, $q0); if($q0) echo mysqli_error($con); while($row=mysqli_fetch_array($result)) { echo "<tr><td>".$row['ename']."</td><td>".$row['empno']. "</td><td>".$row['job']."</td></tr>"; }
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.