Re: [PHP] product listing columns
On 5/21/09 3:05 AM, "Ashley Sheridan" wrote: > I'm advocating tables on this one, as it is pretty much tabular data. i too would put a table of product data in an html table. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
On Wed, 2009-05-20 at 20:23 -0400, PJ wrote: > Ashley Sheridan wrote: > > On Wed, 2009-05-20 at 19:20 -0400, PJ wrote: > > > >> Ashley Sheridan wrote: > >> > >>> On Wed, 2009-05-20 at 17:47 -0400, PJ wrote: > >>> > >>> > Forgot: you can get an idea of what I'm trying to do at > http://www.chiccantine.com/preview.html > -- > Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > - > Phil Jourdan --- p...@ptahhotep.com > http://www.ptahhotep.com > http://www.chiccantine.com/andypantry.php > > > > > > >>> The link you gave doesn't exist online, I'm getting a 404. What do you > >>> mean by a list in columns? Do you want a mysql select to be output as > >>> several columns of data, or one column per select? > >>> > >>> > >> :-[ sorry bout that... should have checked - was working with my mouth > >> & not my brain. > >> > >> It works now. I forgot to upload. > >> hadn't thought about how many columns per select... ??? > >> > >> -- > >> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > >> - > >> Phil Jourdan --- p...@ptahhotep.com > >>http://www.ptahhotep.com > >>http://www.chiccantine.com/andypantry.php > >> > >> > >> > > So you want the sql select to be dumped into a table as it exists in the > > database? > > > > There is a simple way to do this, if you know which fields are in your > > table, and that is just to use a while loop to iterate your records, and > > then explicitly output each field as you want it. This is the preferred > > way, and how I'd do it if I were you. > > > > print ''; > > // put column headers here > > $query = "query here"; > > $result = mysql_query($query); > > while($row = mysql_fetch_array($result)) > > { > > print ''; > > print "{$row['field1'])"; > > print "{$row['field2'])"; > > print "{$row['field3'])"; > > // etc > > print ''; > > } > > print ''; > > > > > Thanks, Ashley, > So, you're advocating using tables... > I thought it might be interesting to do the columns with inline > and then populate them with the query results. It worked marvellously > for the navigation layout and I was able to add background and color to > the product page, regardless which product page we're showing. Quite > neat, really, and very simple. Anyway, I'm going to try. > I must be nuts or something like glutton for punishment, but when you > get it working, it's quite a satisfaction. :-) Thanks again. > > -- > Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > - > Phil Jourdan --- p...@ptahhotep.com >http://www.ptahhotep.com >http://www.chiccantine.com/andypantry.php > > I'm advocating tables on this one, as it is pretty much tabular data. Use tags for your column headers and product names, and s for the rest. It will be easier to display, but with actually give your content meaning, especially if you add a table legend, etc. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
PJ wrote: Michael A. Peters wrote: PJ wrote: I am about to bust my donkey again trying to set up a dynamic product listing for a web page using mysql, php & CSS (the donkey ride). What better place to ask than here in guru heaven: 1. What's a good list/forum to ask for help on CSS - it just is too illogical. I don't think I've ever asked anything here, but I've found answers via google at http://forums.devshed.com/css-help-116/ quite often. I don't do a lot with CSS though. 2. With mysql, is the best way to populate list columns with ul and li or would just a simple column work fine? I have done this with a left navigation column and could repeat such columns next to each other with the final column with input fields for quantities ordered. Background could just be an image to fill the container div. Does that sound about right? Thanks for any suggestions. For navigation columns I always use a list. You can do some need stuff with list via CSS to make either a top - down navigation bar or a horizontal navigation bar - and they still work well in non-graphical browsers, where they simply display as a list. Hmmm I first thought of using the ul & li stuff... but I'm not sure it will populate from a query too easily... ?? especially as I am rather determined to try for a css approach. ?> You can style a list with css. And the list still displays nicely in non graphical browsers that ignore style. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
Michael A. Peters wrote: > PJ wrote: >> I am about to bust my donkey again trying to set up a dynamic product >> listing for a web page using mysql, php & CSS (the donkey ride). >> What better place to ask than here in guru heaven: >> 1. What's a good list/forum to ask for help on CSS - it just is too >> illogical. > > I don't think I've ever asked anything here, but I've found answers > via google at http://forums.devshed.com/css-help-116/ quite often. > > I don't do a lot with CSS though. > >> 2. With mysql, is the best way to populate list columns with ul and li >> or would just a simple column work fine? I have done this with a left >> navigation column and could repeat such columns next to each other with >> the final column with input fields for quantities ordered. Background >> could just be an image to fill the container div. >> Does that sound about right? >> Thanks for any suggestions. >> > > For navigation columns I always use a list. > You can do some need stuff with list via CSS to make either a top - > down navigation bar or a horizontal navigation bar - and they still > work well in non-graphical browsers, where they simply display as a list. > Hmmm I first thought of using the ul & li stuff... but I'm not sure it will populate from a query too easily... ?? especially as I am rather determined to try for a css approach. -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
Ashley Sheridan wrote: > On Wed, 2009-05-20 at 19:20 -0400, PJ wrote: > >> Ashley Sheridan wrote: >> >>> On Wed, 2009-05-20 at 17:47 -0400, PJ wrote: >>> >>> Forgot: you can get an idea of what I'm trying to do at http://www.chiccantine.com/preview.html -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php >>> The link you gave doesn't exist online, I'm getting a 404. What do you >>> mean by a list in columns? Do you want a mysql select to be output as >>> several columns of data, or one column per select? >>> >>> >> :-[ sorry bout that... should have checked - was working with my mouth >> & not my brain. >> >> It works now. I forgot to upload. >> hadn't thought about how many columns per select... ??? >> >> -- >> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." >> - >> Phil Jourdan --- p...@ptahhotep.com >>http://www.ptahhotep.com >>http://www.chiccantine.com/andypantry.php >> >> >> > So you want the sql select to be dumped into a table as it exists in the > database? > > There is a simple way to do this, if you know which fields are in your > table, and that is just to use a while loop to iterate your records, and > then explicitly output each field as you want it. This is the preferred > way, and how I'd do it if I were you. > > print ''; > // put column headers here > $query = "query here"; > $result = mysql_query($query); > while($row = mysql_fetch_array($result)) > { > print ''; > print "{$row['field1'])"; > print "{$row['field2'])"; > print "{$row['field3'])"; > // etc > print ''; > } > print ''; > > Thanks, Ashley, So, you're advocating using tables... I thought it might be interesting to do the columns with inline and then populate them with the query results. It worked marvellously for the navigation layout and I was able to add background and color to the product page, regardless which product page we're showing. Quite neat, really, and very simple. Anyway, I'm going to try. I must be nuts or something like glutton for punishment, but when you get it working, it's quite a satisfaction. :-) Thanks again. -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
PJ wrote: I am about to bust my donkey again trying to set up a dynamic product listing for a web page using mysql, php & CSS (the donkey ride). What better place to ask than here in guru heaven: 1. What's a good list/forum to ask for help on CSS - it just is too illogical. I don't think I've ever asked anything here, but I've found answers via google at http://forums.devshed.com/css-help-116/ quite often. I don't do a lot with CSS though. 2. With mysql, is the best way to populate list columns with ul and li or would just a simple column work fine? I have done this with a left navigation column and could repeat such columns next to each other with the final column with input fields for quantities ordered. Background could just be an image to fill the container div. Does that sound about right? Thanks for any suggestions. For navigation columns I always use a list. You can do some need stuff with list via CSS to make either a top - down navigation bar or a horizontal navigation bar - and they still work well in non-graphical browsers, where they simply display as a list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
On Wed, 2009-05-20 at 19:20 -0400, PJ wrote: > Ashley Sheridan wrote: > > On Wed, 2009-05-20 at 17:47 -0400, PJ wrote: > > > >> Forgot: you can get an idea of what I'm trying to do at > >> http://www.chiccantine.com/preview.html > >> -- > >> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > >> - > >> Phil Jourdan --- p...@ptahhotep.com > >>http://www.ptahhotep.com > >>http://www.chiccantine.com/andypantry.php > >> > >> > >> > >> > > The link you gave doesn't exist online, I'm getting a 404. What do you > > mean by a list in columns? Do you want a mysql select to be output as > > several columns of data, or one column per select? > > > :-[ sorry bout that... should have checked - was working with my mouth > & not my brain. > > It works now. I forgot to upload. > hadn't thought about how many columns per select... ??? > > -- > Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > - > Phil Jourdan --- p...@ptahhotep.com >http://www.ptahhotep.com >http://www.chiccantine.com/andypantry.php > > So you want the sql select to be dumped into a table as it exists in the database? There is a simple way to do this, if you know which fields are in your table, and that is just to use a while loop to iterate your records, and then explicitly output each field as you want it. This is the preferred way, and how I'd do it if I were you. print ''; // put column headers here $query = "query here"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { print ''; print "{$row['field1'])"; print "{$row['field2'])"; print "{$row['field3'])"; // etc print ''; } print ''; Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
Stephen wrote: > PJ wrote: >> I am about to bust my donkey again trying to set up a dynamic product >> listing for a web page using mysql, php & CSS (the donkey ride). >> What better place to ask than here in guru heaven: >> 1. What's a good list/forum to ask for help on CSS - it just is too >> illogical. >> > I suggest you take a look at sitepoint.com, for all aspects of web > building and design. Oh, I stumble across it from time to time... but I've got a rather large collection of bookmarks to looks for help. Thanks for that. >> 2. With mysql, is the best way to populate list columns with ul and li >> or would just a simple column work fine? I have done this with a left >> navigation column and could repeat such columns next to each other with >> the final column with input fields for quantities ordered. Background >> could just be an image to fill the container div. >> Does that sound about right? >> Thanks for any suggestions. >> > It seems to me that you are actually building a table and should use > html tables. With css for the > layout and formatting, of course. :) Well, I just read most of the debate on css & tables... and I think it can be done. I am already stumbling on some design issues which are absolutely ridiculous in css... for example, I haven't understood or figured out why a refuses to shrink the bottom boundary no matter what directions it is given without any apparent reason. I have checkd inheritance, !important, nesting, clear, inline, etc. and nothing does it. But I have already filled columns from mysql wich css and it looks and works just fine. Besides, it's a challenge. ;-) > > > Stephen > -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
Ashley Sheridan wrote: > On Wed, 2009-05-20 at 17:47 -0400, PJ wrote: > >> Forgot: you can get an idea of what I'm trying to do at >> http://www.chiccantine.com/preview.html >> -- >> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." >> - >> Phil Jourdan --- p...@ptahhotep.com >>http://www.ptahhotep.com >>http://www.chiccantine.com/andypantry.php >> >> >> >> > The link you gave doesn't exist online, I'm getting a 404. What do you > mean by a list in columns? Do you want a mysql select to be output as > several columns of data, or one column per select? > :-[ sorry bout that... should have checked - was working with my mouth & not my brain. It works now. I forgot to upload. hadn't thought about how many columns per select... ??? -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
PJ wrote: I am about to bust my donkey again trying to set up a dynamic product listing for a web page using mysql, php & CSS (the donkey ride). What better place to ask than here in guru heaven: 1. What's a good list/forum to ask for help on CSS - it just is too illogical. I suggest you take a look at sitepoint.com, for all aspects of web building and design. 2. With mysql, is the best way to populate list columns with ul and li or would just a simple column work fine? I have done this with a left navigation column and could repeat such columns next to each other with the final column with input fields for quantities ordered. Background could just be an image to fill the container div. Does that sound about right? Thanks for any suggestions. It seems to me that you are actually building a table and should use html tables. With css for the layout and formatting, of course. :) Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] product listing columns
On Wed, 2009-05-20 at 17:47 -0400, PJ wrote: > Forgot: you can get an idea of what I'm trying to do at > http://www.chiccantine.com/preview.html > -- > Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > - > Phil Jourdan --- p...@ptahhotep.com >http://www.ptahhotep.com >http://www.chiccantine.com/andypantry.php > > > The link you gave doesn't exist online, I'm getting a 404. What do you mean by a list in columns? Do you want a mysql select to be output as several columns of data, or one column per select? Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] product listing columns
Forgot: you can get an idea of what I'm trying to do at http://www.chiccantine.com/preview.html -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] product listing columns
I am about to bust my donkey again trying to set up a dynamic product listing for a web page using mysql, php & CSS (the donkey ride). What better place to ask than here in guru heaven: 1. What's a good list/forum to ask for help on CSS - it just is too illogical. 2. With mysql, is the best way to populate list columns with ul and li or would just a simple column work fine? I have done this with a left navigation column and could repeat such columns next to each other with the final column with input fields for quantities ordered. Background could just be an image to fill the container div. Does that sound about right? Thanks for any suggestions. -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php