Profile

Achievement

first submission:submitting first snipplet

apphp-snippets's Recent SnippetsTagged mysql



« Prev 1 Next »
This snippet allows you to get random record from given table by weight. To run it, it must have a field named "weight". The more "weight" is assigned, the more often the record is selected. The value of "weight" should be an integer between 1 and 10...
0 887 posted 6 years ago by apphp-snippets
This snippet allows you to insert new record into table. In case a unique key already exists - it updates appropriate fields only, leaving other fields untouched.
0 912 posted 6 years ago by apphp-snippets
MySQL has a handy and simple string function REPLACE() that allows table data with the matching string to be replaced by new string. This is useful if there is need to search and replace a text string which affects many records or rows, such as chang...
0 900 posted 10 years ago by apphp-snippets
This is a very simple snippet about how to create a database 1st, a user and then assign some privileges to the user to allow him/her to perform some specific actions like insert, create, update, select etc.
0 777 posted 10 years ago by apphp-snippets
« Prev 1 Next »