CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Recommended approach for using codecharge studio php, w/ mysql and jpeg images

Print topic Send  topic

Author Message
MBANC

Posts: 2
Posted: 08/01/2007, 6:42 AM

I am using codecharge studio php, w/ mysql. What's the recommend approach for storing jpg images when the image data and index key is stored in mysql. I have multiple images per index key that I want to display. My data is property information that is updated daily w/ multiple pictures that are current in the format of jpegs. the images are currently sored in a ftp folder and the data is in a mysql database. I need to display the property information and the associated pictures. example of the data index key:870364, example of the image files: 870364_1.jpg, 870364_2.jpg, 870364_3.jpg ect. the data index key is the first 6 numbers of the associated image name.

Thanks for your suggestion in advance... Bill
_________________
Bill Hall
View profile  Send private message
datadoit.com
Posted: 08/01/2007, 6:55 AM

MBANC wrote:
> I am using codecharge studio php, w/ mysql. What the recommend approach for
> storing jpg images when the image data and index key is stored in mysql. I have
> multiple images per index key that I want to display. My data is property
> information that is updated daily w/ multiple pictures that are current in the
> format of jpegs. the images are currently sored in a ftp folder and the data is
> in a mysql database. I need to display the property information and the
> associated pictures. example of the data index key:870364, example of the
> image files: 870364_1.jpg, 870364_2.jpg, 870364_3.jpg ect. the data index key
> is the first 6 numbers of the associated image name.
>
> Thanks for your suggestion in advance... Bill
> _________________
> Bill Hall
> ---------------------------------------

Bill, if you want CCS to automagically display your images in a grid or
record form with little or no custom coding, then create a data table
that looks something like:

pic_id (INTEGER, Auto Increment, PK)
property_id
filename

When you do your image file uploads, post information to this table.
MBANC

Posts: 2
Posted: 08/01/2007, 7:07 AM

how do I capture or read the image file names automaticly into the database using your format? I will need to capture or read this information from a ftp folder which will contain the updated jpeg images.
_________________
Bill Hall
View profile  Send private message
datadoit.com
Posted: 08/01/2007, 7:38 AM

MBANC wrote:
> how do I capture or read the image file names automaticly into the database
> using your format? I will need to capture or read this information from a ftp
> folder which will contain the updated jpeg images.
> _________________
> Bill Hall
> ---------------------------------------

Look here for info on the FileUpload component:

http://docs.codecharge.com/studio31/html/Components/Obj...Upload.html?toc

If you want to mass, pre-populate a database table from the contents of
your images folders, then you'll have to do a custom script.

Something along the lines of:

1. Create a CCS grid showing properties by id.

2. In the BeforeShowRow event, create custom code to:
a) See if property id exists in a file name in your images folder,
using functions like substr(), strpos(), and file_exists().
b) If the file exists with property id:
i) Check to make sure the image doesn't already exist in the data
table for the image - since you're using id_1, id_2, etc.
ii) Insert or update the file information into the database. See:
http://docs.codecharge.com/studio31/html/ProgrammingTec...tomSQL.html?toc

3. Make sure your grid's display limit is blank if you want to do all of
the records. BeforeShowRow will only work on records that are actually
shown.

You could do all of this in 100% custom code also if you like. The grid
just gets you started with a recordset.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.