Formatting retrieved data from a mysql database
Posted 26 July 2006 - 06:14 PM
I have a database with artists and their artworks. The fields are among others: artist name, artist year of birth/death. title artwork, year in which artwork was produced, measurements artwork, material of artwork, whether signed/unsigned, price, etc..
When visitors click on for example the A (in the navigation), they get a list of all artists whose lastname starts with an A, with beneath the arist's name the artworks available. When they click on an artwork, they get a new page with the following information :
[IMAGE OF ARTWORK]
Alexander Adonixander (1900-1987)
Apollo | 1979 | Unsigned
Oil on canvas | 51 x 55 cm
What I want is that visitors can navigate via a page numbering to a next page where they can get more information concerning provenance, literature about the arwork/artist, condition of the artwork etc.
I cannot do this with if(strlen($total text first page)>...) then you can click on page numbering 2, where you get the additional info, because the string length of the data retrieved on the first page are different for each artist, of course.
So, for example, is it possible to write in PHP: when the field 'price' has been retrieved from the database (see example above) then the remaining data (provenance, literature etc..) can be viewed on page 2.
Or does someone know another solution??
Thanks in advance!!
Posted 26 July 2006 - 06:19 PM
SELECT name,birth,title,price, etc.. FROM ...
or [php] * 1000... PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...
Posted 26 July 2006 - 06:25 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users