Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 18th, 2006, 04:18 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help creating tables

I have a online store and here is my probelm:

I need to have product details stored in the DB and pulled into the product decriptions as needed.
Some products need them and some don't, and the ones that do may or may not need all of the feilds so I only want it the add it to the product decscripion if there is info but not give me a bunch of empty fields fo the ones that dont.
Reply With Quote
  #2 (permalink)  
Old January 19th, 2006, 09:11 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: London, London, United Kingdom.
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Either you use 2 diffrent tables - or you just deal with the empty fields in a diffrent way:
<?php
if ( field_data == "" ) {
?>
<!-- Empty field --!>
HTML here

<?php
}
if ( field_data != "" ) {
?>
<!-- Not Empty field --!>
HTML here
<?php
}
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Tables in RichTextBox katsarosj Pro VB.NET 2002/2003 13 March 14th, 2014 06:50 AM
Creating tables on the fly Keith Smith Access VBA 1 January 15th, 2008 10:49 AM
creating tables within tables in access??? carswelljr Access 3 August 23rd, 2006 02:21 PM
Creating word tables, PLEASE help :D Cadey VB How-To 1 December 1st, 2003 08:31 AM
Creating Tables Programmatically stu9820 ASP.NET 1.0 and 1.1 Basics 10 October 22nd, 2003 05:25 PM



All times are GMT -4. The time now is 07:29 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.