Friday, September 27, 2019

Convert mysql to mysqli

Today to want to share how i convert from old system that using mysql to mysqli..

First this is for config file.

mysql



mysqli

 

changes also have to do in fn file

mysql



mysqli



Can you see the different that you have to add or adjust a bit.

in your files where your actual code to show add those file in the beginning.

<?php
session_start();
include_once 'include/config.php';
include_once 'include/fn.php';
?>

like this.
 

connect to MySqli using class

Today I want to show you guys how to connect to mysqli using class. You need to have 3 files.

config.php (your database connection)



fn.php (act as controller)



index.php (this is where you files are)



I'm using this code when i have to convert the old system in PHP 5.2 to PHP 7.1..
Amazingly it works.

Sunday, September 22, 2019

How to create new running number for specific code

 
Hello and Assalamualaikum,
 
 
Here a tip for you guys to try it out..
 
 
Hope it will give some idea for you guys..
 
 
The Code Like This
 
 
JGS0001
 
 
and you have to make it the running number from it.. with code GS is come from the group code (kodkumpulan) on selected value..
 
 
here the code..
 
 
 
the new code will be
 
JGS0002
 
 


Enjoy, Hope this post will be benefit for all of you. Thank You.










Sya Ahmad
Programmer in Ministry of Health


LinkWithin

Related Posts Plugin for WordPress, Blogger...