Need help - display base and enhanced database lists
Hi - somewhat a matter of newbie so bear with me. The project is a fairly simple directory of product online. I have a MySQL database and have implemented two pages - search.php and results.php. So far so good. The db table has a number of entries, some of which are at the base (free) and some are improved (paid - for). The idea is to be able to search so that when you enter (for example) the chocolate, it will return all matches for this category, but the upgraded listings will appear in a color box at the top of the page, with basic listings displayed below in a clearer style. Improved lists have a product description in the table db, basic listings do not. In a sense I'm looking for is the kind of thing, you get when you Google - sponsored at the top, the rest below. I have no idea how to do to achieve this goal, but suppose that something along the lines of two sets of records will have to be attached to the results page, but I don't know how this will work in practice. If someone can point me in the right direction I'd appreciate really, especially in non-techie way! Thanks in advance for any input,Kind regards
Jeff
February 28, 2009 in macromedia.dreamweaver.appdev, jeffmg wrote:
> Thanks for the responses - to answer Joe's question, the records are
> differentiated in the database only by the fact that some have a
> entry in the description field, some don't. I'm not sure what I
> must be made to change the table so that the Scriptures a
> description displays first.
> At the moment there are 16 fields - id, company, Address1, contact
> address2.
> city, County, zip code, country, phone, fax, e-mail, web,.
> Services and products, descriptions - the only differentiation is
> that some entries have something in the description field (improved)
> some don't (base) - I would have another column of some sort which
> means which is improved and is not using a 1 or a 0, or
> have I misread the post below?
N ° the SQL statement I have provided will give you what you want:
SELECT id, contact, company, Address1, Address2, city, County,
Postal code, country, phone, fax, e-mail, web, services, products,
Description, (LENGTH (description) > 0) AS improved
FROM MyTable
ORDER BY DESC, produced enhanced
A little explanation:
"(Length (Description) > 0) AS improved" returns 1 if there is "
anything in the "description" field and 0 otherwise. ' > ' is a Boolean
operator which returns TRUE (1) or FALSE (0). You can then use
that sort, and since you want to "improved" products to sort to the
top of page, sorting must be descending.
A little more explanation:
You want to do this at the time of the selection. There is a general principle of
design of database you want to not store anything in a database
how you can derive from data in the database. For example, if you have
dates of birth, you do not want to store also age, because as soon as
a day has passed, the age, the information is out of date. On the other hand
hand, DOB will never be obsolete, and you can use it to determine
age at the time of the recovery.
The same with your system - if the product changes.
someone will enter or remove the description, but inevitiably
Remember to change the field "improved."
--
Joe Makowiec
http://Makowiec.NET/
E-mail: http://makowiec.net/contact.php
Tags: Dreamweaver
Similar Questions
-
Need help to download and use MovieMaker
Need help to download and use MovieMaker. I have XP Home Edition Version 2002 SP 3. Could not locate moviemaker. Read somewhere that it was in SP2. How can I go about it? Since it puts I have SP3, I have to add SP2 or how do I go about this? THX
Hi Boolaboola,
MovieMaker is a separate program and is not installed in the service pack. Here is a link to download the latest version (Windows Live Movie Maker), more tutorials, articles, and much additional information on Windows Movie Maker:
Movie Maker:
Windows Live Movie Maker download:
http://download.live.com/MovieMaker?WA=wsignin1.0
Getting started with Windows Movie Maker
http://Windows.Microsoft.com/en-us/Windows-Vista/getting-started-with-Windows-Movie-Maker
Articles and tutorials for Windows Movie Maker
http://www.windowsmoviemakers.NET/tutorials/
How to-tutorials - Movie Maker
http://www.myvideoproblems.com/tutorials/MovieMaker/TutorialsMovieMaker.htm
Hope this helps,
Steve <> Microsoft Partner
-
Need help to find and install the game Chess Titans Windows Vista for XP
Need help to find and install the game Chess Titans Windows Vista for XP
Hi SBOYDC130guy,
We will not be able to install titan of failures on windows XP because it is designed for Windows Vista and Windows 7 and it's built-in game.
With regard to:
Samhrutha G S - Microsoft technical support.
Visit our Microsoft answers feedback Forum and let us know what you think.
-
Need help to download and install Acrobat Pro
Need help to download and install Acrobat Pro
Hello
Please see the link below for download: -.
-
Need help - domain deleted and cannot add-fault domain already exists - website down
Trying to reconfigure our domain configuration, I removed the main domain name to add again so that it does not point to an external DNS server.
I deleted the domain and now when I try to add again, I get the following error:
Domain already exists. Please delete all the records associated with this domain before adding it again.
I have no way to present a plane ticket when I go to help and support and our site is now down from the home page. I need help as soon as POSSIBLE.
I was able to submit a case when I switched browsers (Chrome apparently does not display the bar/case of research presentation). The case is
OBNW5020171
The area, I'm trying to add is surfaid.org
Hey Mike.Avocado26,
I think I erased the field wildwasatchmedia.com in our database. Can you please try adding it again now?
See you soon.
-
Urgent need help with find and change / GREP
I'm working on a manual that contains more than a thousand paintings. I'm not quite familiar with GREP and need help to determine the right to coding/jokers to change the character style to a group of words/numbers on a global basis.
For example, in Chapter 7, a paragraph style is applied to this line of text:
TABLE 7.1: T4, T3, FREE T4 AND FREE T4ED
I need to change "table 7.1:" for a character style and so of suite/so on up to "Table 7,150:"-while leaving the other numbers on the same line unchanged also.»» Is it possible to do without having to manually each table style number?
gd247 wrote:
I'm working on a manual that contains more than a thousand paintings. I'm not quite familiar with GREP and need help to determine the right to coding/jokers to change the character style to a group of words/numbers on a global basis.
For example, in Chapter 7, a paragraph style is applied to this line of text:
TABLE 7.1: T4, T3, FREE T4 AND FREE T4ED
I need to change "table 7.1:" for a character style and so of suite/so on up to "Table 7,150:"-while leaving the other numbers on the same line unchanged also.»» Is it possible to do without having to manually each table style number?
No need for GREP. If "TABLE 7.1:" is text, you can create a nested character style that extends through the colon, in the paragraph style. "
If "TABLE 7.1:" is created by a numbered list of automatic type paragraph style, you can specify a character style named for the part of automatic numbering in the drop-down menu Style of character, in the Style of numbering of the chips section and numbering of the dialog box Options of paragraph style. If the character style does not exist, you can stay in the operation of paragraph options by choosing 'New Style of character' in the menu. After you create the new style, you're back in the process of definition of the paragraph.
HTH
Kind regards
Peter
_______________________
Peter gold
Know-how ProServices
-
HP laptop: need help with internet and search for things
whenever I'm on chrome internet explore google ect and go to tab it is says unknown error or no internet connection or anything and just takes me chrome ect. I need help with this im involved in a byod class and my computer won't let me on what whatever usually it just starts out black and white and the seeds I my search request
Yes it's a Windows 10 and it arrived already installed I'll take the other info now
-
Need help for testing and practice the concepts of the server at home
Original title: Hello team
I need assistance with testing and to practice the concepts of the server at home... I don't have an option to test laboratory pls suggest possible ways that I can practice... need help... Please help
Hi Sachinadi,
You can ask your question in the MSDN Forums: http://msdn.microsoft.com/en-us/hh361695.aspx
Thank you.
-
My iPod series is YM5387WZSZB please I need help of the year
Hello
Were there any changes made on the computer before the show?
I suggest you to return the item and check if it helps:
iPod not recognized in 'My computer' and in iTunes for Windows
-
Need help with sizing and save files in batches
Hi need help with a project.
I have thousands of vector files that I need size of 350px X 350px, and then place it on a work plan x 600px-600px.
Then I need to save it to the web as a PNG with a transparent background.
Could I do a script for? or is there another way to do it in batches?
I wouldn't have to open them one by one and resize the work plan then the image and save it one by one as that would take forever.
Any help some suggestions would be greatly appreciated.
ID do as a series of actions photoshop if the end result is png,
pro image processor can help you make automatically, if you must resize batch additional... >
https://sourceforge.NET/projects/PS-scripts/files/image%20Processor%20PRO/v3_2%20betas/
I think that your work can run in a few steps, but for simplicity, I would like to start / test with a new photoshop action recording
Open a file, change the size of the image to 350 x 350
Change the canvas size,
then save under...
-
I need help for the download, installation and implementation of Adobe Photoshop elements 14 and Adobe Premium elements 14, upgrades of Adobe Photoshop elements 11 and Adobe Premium 11 elements. Could someone help me please? Thank you.
When you start the installation of your pse14, you will be asked its serial number (pse, 14). Setup then checks for the EP 11 and do not find that it installed you invites to select your product qualifying. Select PES 11. Asked you then your serial number 11 of pse.
Enter the correct number at the right time and proceed with the installation.
Similarly for elements of the first.
-
IM really new to this program as a
day new hehe and I need help. im making a game quiz and your supposed
ED to score in the hoop with a circle. I have the
codes for the drag and drop for the circle, but I need help with the collision between the Hoop and the ball, I want to go to the image next or gotoandPlay when the ball touches the ring. HELP PLEASE
You should not attach code to objects. and you can be able to happen by using a loop.
Start by removing all the code the suggested by maqro (i.e. as3) and by removing all the code attached to objects.
use:
{yourobject.onPress = function ()}
this.startDrag ();
}
{yourobject.onRelease = yourobject.onReleaseOutside = function ()}
this.stopDrag ();
{if (this.) HitTest (whatever))}
do something
}
}
-
Need help with using pse4 not taken in charge by adobe. How subjects do not available and I have never used something like that. Aide said there is a download but have not been able to do. What is a rookie to do? Y at - it somewhere that I can go to learn how to use PSE4?
To find out how your problem:
http://kb2.Adobe.com/CPS/402/kb402107.html
To get help from the CD files you double-click in the finder, go to PDF help and drag it to the desktop or elsewhere.
-
Hi all
I need assistance to find and replace words between \ make "BOLD" and delete the symbol in my pages just like below.
Text example:
He astonished his parents by \turning a childhood obsession\ in a decent-paying career, much to their dismay.
After the text:
He astonished his parents by turning a childhood obsession into a decent-paying career, much to their dismay.Thanks in advance,
Siva
(\\+?) will never return more than 1 backslash because the? is telling to find the shortest match. {I would change that to each (\) or (\\{2)}
-
Need help with menus and lists
Hi, first of all, im new here and im hoping to get help
I have a school assignment to do with dreamweaver, where I need to build an e-book
Specifically, Ive got a roll more images that I was planning to do a menu bar on
I was told to use spry, but they help at all.
I was hopeing that my reversal, buttons could be roles more and a list/menu appears, such as on many sites
Like this one http://projectseven.com/tutorials/navigation/auto_hide/workpage.htm
(with a black background which comes down from the roll over image)
How would I go about this
I don't have much experience with CSS aswell
A tutorial or any help would be appreciated
Thanks in advance
Arron
Get rid of the image swaps, they add nothing to your page and the code is horrible.
Copy and paste your code top table in the page menu above the list.
Copy and paste your low table code in the menu page below lists.
Validate your code, it should work.
Code Validation tools
------------------------------------
HTML - http://validator.w3.org/Nancy O.
ALT-Web Design & Publishing
Web | Graphics | Print | Media specialists
http://ALT-Web.com/
http://Twitter.com/ALTWEB
Maybe you are looking for
-
questions about your purchase next iPhone?
I hope it's a good topic for this forum. I'm looking to come to my iPhone 7 (one for my wife) purchases and one for me. A few questions: -I'm in a contract year NEXT 2 ATT on our s 6 and right intention pay all telephone charges in the next month in
-
USB-6009 DAQmx meter task stops and does not restart when you restart the VI
I have the task of counter DAQmx which "hangs up" while troubleshooting a VI and does not restart when I restart Traoré. See attached fragment VI. The counter works reliably in normal operation, but some combinations of interruption and running "hi
-
error code 80070570 during installation KB2705219
Impossible to find a solution fo update error code 80070570 when you try to install KB2705219. I have windows vista 32 bit. Have you had recurrent problems of this type of update and you'd be grateful for any help.
-
HV 20 camcorder is not recognized by my pc
When I connect my canon hv20 connection is not recognized
-
Even if we do not have IPV6 enabled on all types of adapters our domain servers and windows 7 desktops still seem to resolve IPV6 addresses. We run a Microsoft difficulty he 50410 and this solves our problem but only for a short period of time. Not s