Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
PHP Help!!!
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="CorD SaC" data-source="post: 22256887" data-attributes="member: 525096"><p><span style="font-size: 12px"><span style="color: Blue">කොහොමද යකෝ මේ ටික කලර් කලේ..<img src="/styles/default/xenforo/smilies/default/shocked.gif" class="smilie" loading="lazy" alt=":shocked:" title="Shocked :shocked:" data-shortname=":shocked:" />ඇඟ හිරි වැටිලා ගියා ඒක දැක්කම..<img src="/styles/default/xenforo/smilies/default/sorry.gif" class="smilie" loading="lazy" alt=":sorry:" title="Sorry :sorry:" data-shortname=":sorry:" />මෙහෙම කරපන්,සාමානයෙන් බන් මෙහෙම කෝඩ් ලියන්නෙ නෑ..පුලුවන්නම් මේවා prepared statements වලින් ලියපන්..නැතනම් security පැත්තක් නෑ බන්.. <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /> උඹ ප්රොජෙක්ට් එකකටද කරන්නේ..? PDO style or OOP වලින් කරපන් මචන් පුලුවන්නම්.. <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></span></span></p><p><span style="font-size: 12px"><span style="color: Blue"></span></span></p><p></p><p>[PHP]</p><p>$query = "SELECT count(*) as total FROM FROM ongoing_booking WHERE vehical_number ='$vehicalnumber'";</p><p>$sql = mysqli_query($connect, $query);</p><p>$all = mysqli_fetch_assoc($sql);</p><p>$total = $all['total'];</p><p></p><p>if ($total == 1)</p><p> {</p><p> }</p><p> else</p><p> {</p><p> }</p><p>[/PHP]</p><p></p><p></p><p><span style="color: blue"><span style="font-size: 15px">මේ තියෙන්නේ PDO style එකට.. <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></span></span></p><p></p><p></p><p>[PHP]</p><p>$connection = mysqli_connect('localhost','root','','yourdb');</p><p>if (mysqli_connect_errno()) {</p><p>printf("Connect failed: %s\n", mysqli_connect_error());</p><p>exit();</p><p>}</p><p></p><p>if ($stmt = mysqli_prepare($connection, "SELECT*FROM ongoing_booking WHERE vehical_number = ?")) {</p><p> </p><p> mysqli_stmt_bind_param($stmt, "s", $vehicalnumber);</p><p> mysqli_stmt_execute($stmt);</p><p> mysqli_stmt_store_result($stmt);</p><p> </p><p> if (mysqli_stmt_num_rows($stmt)) {</p><p> </p><p> </p><p> }</p><p> else{</p><p> </p><p> } </p><p></p><p></p><p>}</p><p>[/PHP]</p><p></p><p></p><p><span style="font-size: 15px"><span style="color: Blue">Read more :</span></span> <a href="http://php.net/manual/en/mysqli-stmt.fetch.php" target="_blank">http://php.net/manual/en/mysqli-stmt.fetch.php</a></p></blockquote><p></p>
[QUOTE="CorD SaC, post: 22256887, member: 525096"] [SIZE="3"][COLOR="Blue"]කොහොමද යකෝ මේ ටික කලර් කලේ..:shocked:ඇඟ හිරි වැටිලා ගියා ඒක දැක්කම..:sorry:මෙහෙම කරපන්,සාමානයෙන් බන් මෙහෙම කෝඩ් ලියන්නෙ නෑ..පුලුවන්නම් මේවා prepared statements වලින් ලියපන්..නැතනම් security පැත්තක් නෑ බන්.. :) උඹ ප්රොජෙක්ට් එකකටද කරන්නේ..? PDO style or OOP වලින් කරපන් මචන් පුලුවන්නම්.. :) [/COLOR][/SIZE] [PHP] $query = "SELECT count(*) as total FROM FROM ongoing_booking WHERE vehical_number ='$vehicalnumber'"; $sql = mysqli_query($connect, $query); $all = mysqli_fetch_assoc($sql); $total = $all['total']; if ($total == 1) { } else { } [/PHP] [COLOR="blue"][SIZE="4"]මේ තියෙන්නේ PDO style එකට.. :)[/SIZE][/COLOR] [PHP] $connection = mysqli_connect('localhost','root','','yourdb'); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if ($stmt = mysqli_prepare($connection, "SELECT*FROM ongoing_booking WHERE vehical_number = ?")) { mysqli_stmt_bind_param($stmt, "s", $vehicalnumber); mysqli_stmt_execute($stmt); mysqli_stmt_store_result($stmt); if (mysqli_stmt_num_rows($stmt)) { } else{ } } [/PHP] [SIZE="4"][COLOR="Blue"]Read more :[/COLOR][/SIZE] [url]http://php.net/manual/en/mysqli-stmt.fetch.php[/url] [/QUOTE]
Insert quotes…
Verification
Nawa warak dahaya keeyada? (Namaya wadi kireema dahaya)
Post reply
Top
Bottom