- Messages
- 339
- Reaction score
- 14
- Points
- 38
Example sir ng foreign plz.
Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.
All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!
Hello. may naka encounter na po ba nitong error ....Pahelp please di ko maka usad salamat
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\PHP\result.php on line 23
No result!
- - - Updated - - -
<?php
include("connections.php");
if(empty($_GET["search"])){
echo "Walang laman si GET!..";
}else{
$check = $_GET["search"];
$terms = explode(" ", $check);
$q = "SELECT * FROM student WHERE ";
$i = 0;
foreach($terms as $each){
$i++;
if ($i==1){
$q = "name LIKE '%$each%'";
}else{
$q = "OR name LIKE '%$each%'";
}
}
$query = mysqli_query($connections, $q);
$c_q = mysqli_num_rows($query);
if($c_q > 0 && $check !=""){
while($row = mysqli_fetch_assoc($query)){
echo $name = $row["name"] . "<br>";
}
}else{
echo "No result!";
}
}
?>
<?php
include("connections.php");
if(empty($_GET["search"])){
echo "Walang laman si GET!..";
} else {
$check = $_GET["search"];
$terms = explode(" ", $check);
$q = "SELECT * FROM student WHERE ";
$i = 0;
foreach($terms as $each){
if ($i==1){
$q = "name LIKE '%$each%'";
} else {
$q = "OR name LIKE '%$each%'";
}
$i++;
}
$query = mysqli_query($connections, $q);
$c_q = mysqli_num_rows($query);
if($c_q > 0 && $check !=""){
while($row = mysqli_fetch_assoc($query)){
echo $name = $row["name"] . "<br>";
}
} else {
echo "No result!";
}
}
?>
Try this, mali ata yung incrementation mo sa loop eh.
Code:<?php include("connections.php"); if(empty($_GET["search"])){ echo "Walang laman si GET!.."; } else { $check = $_GET["search"]; $terms = explode(" ", $check); $q = "SELECT * FROM student WHERE "; $i = 0; foreach($terms as $each){ if ($i==1){ $q = "name LIKE '%$each%'"; } else { $q = "OR name LIKE '%$each%'"; } $i++; } $query = mysqli_query($connections, $q); $c_q = mysqli_num_rows($query); if($c_q > 0 && $check !=""){ while($row = mysqli_fetch_assoc($query)){ echo $name = $row["name"] . "<br>"; } } else { echo "No result!"; } } ?>
You should consider using OOP instead of procedural, mas madali yun.
Sir sinubukan ko yung code mo mali pa rin sir sa line 22 yung code mo
Sir sinubukan ko yung code mo mali pa rin sir sa line 22 yung code mo
- - - Updated - - -
itong line boss
$c_q = mysqli_num_rows($query);
Check your query, nagrereturn ng "false" query mo kaya hindi maparse ng mysqli_num_rows();
PHP TUTORIAL TAGALOG
( Procedurals / Raw )
Human ----> To -----> Demi-Human
------------------------------------------------
SEASON 1
"The Step in Stone"
LESSON 1 VALIDATION
LESSON 2 DATABASE
LESSON 3 DATABASE CONNECTION
LESSON 4 INSERT
LESSON 5 VIEW OR RETRIEVE
LESSON 6 EDIT OR UPDATE
LESSON 7 DELETE
LESSON 8 FOREACH LOOP
LESSON 9 SEARCH
LESSON 10 LOGIN
LESSON 11 SESSION
Download Season 1
------------------------------------------------
SEASON 2
"Road to Amateur"
LESSON 1 IF ISSET BUTTON
LESSON 2 UPGRADED VALIDATION
LESSON 3 UPGRADED RETRIEVE
LESSON 4 HTACCESS ( .htaccess )
LESSON 5 NAVIGATION TECHNIQUE
LESSON 6 UPGRADED UPDATE
LESSON 7 UPGRADED DELETE
LESSON 8 UPGRADED LOGIN
LESSON 9 UPGRADED SESSION
LESSON 10 UPLOAD
LESSON 11 THE CHECKBOX
LESSON 12 DYNAMIC DROPDOWN
LESSON 13 SENDING EMAIL
LESSON 14 SMS
Download Season 2
------------------------------------------------
SEASON 3
"Road to PHP Lord"
LESSON 1 IMPORT DATA FROM EXCEL TO DATABASE ( EXCEL TO WEB )
LESSON 2 EXPORT DATA FROM DATABASE TO EXCEL ( WEB TO EXCEL )
LESSON 3 AUTO COMPUTE PRICE CHECKBOX
LESSON 4 ONLINE PAYMENT
LESSON 5 TCPDF ( WEB PDF )
Download Season 3
------------------------------------------------
SEASON 4
December 25, 2018
View attachment 1279066
------------------------------------------------
boss salamat po dito ngaun ko palang pag aaralan sana magawa ko ung capstone ko na real time ahaha
HELLO EVERYONE!
BALE ANG LABAS NG SEASON 4 IS SA DEC 25 ..
DONT WORRY!
LAST TUTORIAL NA YAN PARA SA PROCEDURALS. TAPOS SUSUNOD NA ANG CODE IGNITER
DONT FORGET TO SUBSCRIBE AT YOUTUBE
Master GPL @ YouTube
View attachment 1279067
hello sir, salamat sa tut.. nagself study po ako sa mga tuts mo po.. ask ko lang po, bakit po pag tinype ko yung localhost sa browser, eh yung localhost/dashbord po ni Xampp and nagdidisplay? May mali po ba? Maraming Salamat