INSERT INTO WHERE NOT EXISTS

If you want to insert values into a MySQL table, but only if those values don’t already exist, and you don’t want to use a primary key on the table (and deal with the resulting error suppression ), here’s an elegant one-query method of doing so.

INSERT INTO [table name] SELECT '[value1]', '[value2]' FROM DUAL
WHERE NOT EXISTS(
SELECT [column1] FROM [same table name]
WHERE [column1]='[value1]'
AND [column2]='[value2]' LIMIT 1)

OK, technically it’s not a single query.
But it is only one round trip to the MySQL server.

ALIANTHOS BEACH HOTEL IN PLAKIAS, CRETE



WELCOME TO ALIANTHOS BEACH HOTEL IN PLAKIAS, CRETE
Welcome to Alianthos Beach Hotel, our small charming family-run hotel that is located in the traditional village of Plakias, and enjoy the sunny and beautiful Crete, an island of unique and unforgettable experiences.

Our hotel has been a favourite for tourists for more than 25 years, offering a cosy, relaxing and truly memorable holiday and perfectly combines the traditional Cretan style with modern comfort and convenience.

The hotel is famous for its ideal position, on the sea-front road of the village overlooking the crystal waters of the amazing sandy beach of Plakias, the breath-taking view to the Plakias bay and the Livyan Sea, the hospitality and the high-quality accommodation services. All of them in combination to the reasonable prices, making our hotel very attractive to our guests.

We invite you in our hotel to experience the cretan hospitality, to share the culture and the history of our place, to explore the friendly villages of south Crete, to enjoy the beautiful beaches, the bustling cities with nightlife and shopping and the holiday activities such as sea sports, trekking, countryside and mountain walks.


Technologies: HTML, CSS, PHP, mySQL

ANTHOS APARTMENTS IN PLAKIAS, CRETE



Welcome to Anthos Apartments, an amazing small group of apartments that is located in Plakias, a picturesque traditional village in the southern coast of Crete.

Our family-run apartments offer charming self-catering accommodation for your holidays in Crete in a cosy, comfortable and fully-equipped environment. The swimming pool, the big balconies and the amazing garden with flowers and trees can become an ideal solution for quiet and relaxing holidays away from the noise of the city and a guaranty for unforgettable holidays.

Anthos apartments are located on the top of a small hill, in a walking distance (500 meters) away from the beautiful sandy beach of Plakias and offer to our guests an amazing sea-view to the Plakias Bay, the villages and the hills around.

We invite you in our apartments to experience the Cretan hospitality, to share the culture and the history of our place, to explore the friendly villages of south Crete, to enjoy the beautiful beaches, the bustling cities with nightlife and shopping and the holiday activities such as sea sports, trekking, countryside and mountain walks.

Technologies: HTML, CSS, PHP, mySQL