Free knowledge blog: linux, programming, open source, databases, android, frameworks, web and computing in general
A few days ago I did an exercise on a sales system in PHP. It is written in pure PHP, no Javascript. Mind you, for the styles I used a Bootstrap variant.
The files don’t have a structure, but like I said, it’s an example. I also write this because it either serves someone else or it serves myself for some references.
For data persistence it uses MySQL. This POS Save products and sales. It does not handle user permissions. We store the shopping cart in the session, and well, I better explain it in parts in this post.
Obviously this POS software is free and open source.
Today I am going to show you a software that I just made with Laravel. It is a sales system, point of sale, POS or whatever you call it, which is used to keep track of the products that are sold, the sales, and so on.
It is a totally free and open source system; which means that you can use it at no cost, and modify it to your needs or customize it. Among its features we find:
Now let’s see how I have developed it, where you can download it, and so on.
In this article about programming in the Go language (also known as Golang) we will see how to create a REST API that communicates through JSON, saving and displaying data from a MySQL / MariaDB database.
In the end we will have a REST API with Go using the 4 methods: POST, PUT, DELETE and GET using the Mux router. We are also going to implement the 4 operations of a database: insert, update, delete and select.
I will leave the full open source code at the end of the post.
Although there are millions of tutorials about MySQL and PHP, I decided to make mine but in a very very simple way. Before you start, you must have a basic knowledge in MySQL.
It is worth mentioning that we will not see good practices of databases, relationships, etc. We will use the tables as they are, without looking at normalization, or things like that.
Note: this tutorial uses PDO, but remember that we can also use mysqli
functions. Personally I recommend PDO, because it is object oriented. However, I hope to write a tutorial about mysqli in the future.
Android mobile devices are not designed to be servers (although some of them are powerful), however it is always interesting to see how technology advances and day by day we can do more things with our phones.
Today we will see how to install the MySQL or MariaDB server on Android, thanks to the Termux application. For that it is enough to execute a few simple commands and voila, we will have a MySQL database server in our Android; fully functional and ready to execute queries.
If we want to put it for production, we can do it as long as we configure security. In short, we will not see more advanced topics; we will only see how to install mysql on Android.
Here we will use MariaDB and MySQL as synonyms; that is, if you see that I say MariaDB do not get confused, I mean MySQL; and vice versa.
I know that there are really more differences especially with the licenses, but that is another topic and you can search it in Google if you wish.