Optimization of some code!
View Single Post
05-22-2009, 10:07 PM
Join Date: Feb 2009
Location: New York
Originally Posted by
How would I do that then Allwork? I suppose their gonna be seperated by a space or something, but how am I gonna sort those out for good? :)
That really sounds like the stuff I'm looking for!
CoryMathews, thanks for your clearing up! Let's see how this ends up :))
I'll use Corey's example.
$id = $row['id'];
$name = $row['name'];
$website = $row['website'];
So your table now has just 3 columns.
Each portfolio/picture gets a new row. Not new column.
That way as you loop through the rows, you can base your conditionals on the values you get from the rows, not going through each column and doing IF conditionals..
Back to what Sketch said, "if you're using so many if conditionals, there's gotta be a better way to do it" or something like that...
In this case, it's redesigning your DB structure......
View Public Profile
Send a private message to allworknoplay
Find More Posts by allworknoplay