home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Advanced Designer Portfolio

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2111
Discussions: 200,948, Posts: 2,379,414, Members: 246,310
Old June 21st, 2003, 03:23 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jan 2003
Location: L.A.
Posts: 15
Send a message via ICQ to gmarik
Cool
Advanced Designer Portfolio

I realised, that every designer needs a good portfolio.
Than I started to make it. Here is what I have now.
There must be fore modes, with columns changing like this:

PHP Code:
1
2
3
4
5
6

AND

2
4
6

AND

3
6

AND

4
8
9
1011/12 
In these examples slash is eval to class=\"Boxright\" (the dotted line in the screenshot). What do I need to change in my code?


PHP Code:
<table align="center" cellpadding="0" cellspacing="4" width="540">
<?
$cols 
"2"// 2 row mode

$query "SELECT * FROM imglib WHERE cat='$c' ORDER BY $so $o LIMIT $initialPhoto, $it";
if(!
$result mysql_query($query)) echo "Query failed"
while (
$row mysql_fetch_array($resultMYSQL_ASSOC)) { 

    
$data $row["url"]; 
    if (
$i == 0) { 
        echo 
"<tr>"
    } 

    if ((
$i $cols) == ) { // if ($i == $cols)
        
echo "</tr><tr>"
        echo 
"<tr>";
        echo 
"<td width=\"540\" height=\"30\" colspan=\"2\" class=\"BoxBellow\">";
        echo 
"<p>&nbsp;</p>";
        echo 
"</td>";
        echo 
"</tr>";
        
$i 0;    
    } 

    if ((
1&$i)) { // odd shows no dotted line
    
echo "<td width=\"270\">";
    } 
    if (!(
1&$i)) { // even shows a dotted line
    
echo "<td width=\"270\" class=\"Boxright\">";
    }
    
itemplaceholder();
    echo 
"</td>";
    
$i++; 
    } 

    if (
$i != $cols)
    echo 
"</tr>";

    
?>
    </table>
The MySQL database. Works ok.

PHP Code:
CREATE TABLE imglib (
  
id int(10unsigned NOT NULL auto_increment,
  
cat varchar(21) default 'gif',
  
type varchar(21NOT NULL default 'Website template',
  
desc text NOT NULL,
  
url varchar(20) default NULL,
  
price tinytext NOT NULL,
  
author varchar(255) default 'Tagore',
  
timestamp timestamp(14NOT NULL,
  
PRIMARY KEY  (id)
TYPE=MyISAM;


INSERT INTO imglib VALUES (1'gif''Vector logo''''s001''$25''MGJ'20030511040034);
INSERT INTO imglib VALUES (2'gif''Vector logo''''s002''FREE''MGJ'20030511194715);
INSERT INTO imglib VALUES (3'gif''Vector logo''''s003''$30''MGJ'20030510181227); 
Nothing works, just the page numeration (separate) works, but no table displayed (<table> tags are THERE). The other variant code:

PHP Code:
$columns 2
$counter 
0;
echo 
"<tr>";
while (
$row mysql_fetch_array($resultMYSQL_ASSOC)) { 
   if (
$counter % ($columns++)) { // Row change
      
echo "</tr><tr>";
   } elseif ((
$counter % ($columns++)) == $columns) { // Last td on a row
      
echo "<td>"
      
itemplaceholder();
      echo 
"</td>"
   
} else { // Normal td
      
echo "<td>".$row['ID']."</td>";
      echo 
"<td><img src=\"img/divider.gif\" /></td>";
   }
   
$counter++;
}
echo 
"</tr>"
gmarik is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Making Health Care Worse (175)
Is It Just Me? (2940)
Wireless Televisions. (12)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (6)
Is the PSU I received dead? (12)
radeon x850xt platinum & shader.. (5)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Foreign voltage (10)
Recent Discussions
Multiple Restarts Required at Boot (1)
For Sale BFG GTX285 OC2 with 10 year .. (3)
Point and Shoot Camera Suggestions. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Graphics Card Upgrade Question (3)
Laptop with wireless problem. (2)
Internet Lost (1)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
radeon x850xt platinum & shader 3 (5)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Regular Build (6)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)
windows 7 problem (7)


All times are GMT -4. The time now is 10:17 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28