-
Switch-off a row
Can any members give advice on the following...
I operate a UK regional tourism website, advertising holiday accommodation.
The site displays accommodation listings in table rows, with one table per town / village, an example can be found here...
http://www.northumberland-coast.co.u...DBBeadnell.php
The listing details are stored in a MySQL database, administered using phpMyAdmin.
My question is...
When using phpMyAdmin, is it possible to ‘switch-off’ a row on a temporary basis,
then when the owner / agent of the accommodation has paid for the listing,
switch-it back on?
Thanks in advance
Neil
-
-
There is no literal sense in which you can actually disable a row "physically" in the database.
But of course you can search in certain ways.
There are two main strategies for dealing with this, I think:
1. Create two tables. One is for new reservations, the other for paid reservations. Search whichever is relevant and move reservations from one to the other when the status changes.
2. Add a field in the table for "paid" with 1 (true) and 0 (false) values. Then when searching add WHERE `paid`=1.
Unless there is something else more complicated going on, I'd suggest option (2). It's probably easier.
Does that help?
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Hello Daniel
Many thanks for your reply,
yes, your suggestions are very helpful.
Will look into revising our site as advised.
Kind regards
Neil
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks