Re: Problems outputting to a 3 column table in order to crate an image gallery



ste wrote:
Likewise, going to the url:
mywebsite.com/gallery.php?imagetype=portrait
it opens all the images from my database which are tagged with the
category of portrait.

Is there a way to open the gallery showing ALL pictures, without
having to re-write the sql query? i.e. is there a tag I can enter in
a URL which displays images where the imagetype could literally be
anything? mywebsite.com/gallery.php?imagetype=anything


just don't set the imagetype, so the url would be mywebsite.com/gallery.php,
and use this code:

//create database $connection

if(get_magic_quotes_gpc()){
$_GET['imagetype'] = stripslashes($_GET['imagetype']);
}
$imagetype = mysql_real_escape_string( $_GET['imagetype'], $connection);
$where = (isset($_GET['imagetype'])) ? "WHERE imagetype =
'".$_GET['imagetype']."'" : '';
$query = "SELECT * FROM mydatabase ".$where;

Grtz,
--
Rik Wasmus


.



Relevant Pages

  • Re: Filestream Error...
    ... >> I have a list of products in with images stored in a SQL Server 2000 DB. ... which opens another FileStream and keeps it open until ... > You should, however, definitely use a using statement for your database ... > connection:) ...
    (microsoft.public.dotnet.languages.csharp)
  • Export OLE embedded images to file
    ... I have an access 2000 database containing images embedded in an OLE field. ... while the originals are good resolution and clear. ... - Open the scrapbook file (opens with Imaging in W2K) ...
    (microsoft.public.access.externaldata)
  • Export OLE embedded images to file
    ... I have a database containing a lot of images embedded in a OLE field. ... In W2K this opens the file in Imaging. ...
    (microsoft.public.access.externaldata)
  • Re: Tracking Log In and Log Out times of Users
    ... The fact that the database is on the server should be irrelevant. ... Type mismatch and then highlights Set rst = ... On my startup form, (that opens every time the database is open, ... I then went to the load ...
    (microsoft.public.access.modulesdaovba)
  • Re: [PHP] Re: how to display images stored in DB*
    ... Your claim is that in ALL cases using a file system to store images ... bitmaps in a database without a damn good reason, a bad practice, yes. ...
    (php.general)