skygremlin Posted June 21, 2013 Share Posted June 21, 2013 I’m working on replacing our current website with a new version. But am having issues trying to get their current process of updating their db (some site info) to function the same with the new site. Meaning I can’t make their current process work with my code. Currently they, guys in another office, update a database this way (readers digest version): Use Navicat to import some .xslx spreadsheet -> match columns -> finish. This data is displayed on a page. My issue is some of the cells contain bulleted lists, that are displayed as bulleted items on the page. So for argumentative sake lets say the spreadsheet contains 10 rows and12 columns. 7 out of the 12 columns have cells that contain bulleted lists. For example all the cells in column4 are bulleted lists. This could be 2 items or 20. When they display the current page the contents of these cells (lists) appear as bulleted lists. I was finally able to get the cells in a dev DB looking the same (retaining the bulleted lists) using navicat, but when I display them in my php code I just get one long string and the bullets are diamonds with questions marks… Which I’ve seen before and frankly was expecting.. I haven’t been able to get the code for the current site (still working on it) to see if it’s doing something funky with those cells.. But from what I’ve done so far unless I put breaks on each separate line item <br /> in the DB I can’t mimic what they’re doing. Has anybody displayed bulleted cell content, as bullets on a php page? Maybe the col. is a blob.... would that work? *************************************************************************** Because I didn’t have any info to go off of for development I made separate tables linking with primary / foreign keys. So say for example we have 5 jobs, each job has: - 10 Required Job skills - 10 separate items - 5 Desired Job Skills - 5 separate items - 12 Job Responsibilities - 12 separate items - 15 Job duties - 15 separate items - 13 Technical skills - 13 separate items I made a: - Jobs table containing some basic info - Skills table containing the required and desired skills linked to the job via id - Responsibility_duties table containing all the responsibilities and duties linked via job id and so on… I might be able to have this in one table, but I separated them just in case. My query first goes to the jobs table to get all that are active, then goes and grabs the info from the other tables using the id. The code then loops thru the result set and creates new lists in sections.. If nothing is found, say for example no Technical skills that display section is skipped. That’s how I did it. Quote Link to comment https://forums.phpfreaks.com/topic/279434-displaying-data-on-a-page/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.