Lissa Explains it All:  Web Design Forums  

Go Back   Lissa Explains it All: Web Design Forums > LEIA Archives > Web Site Help > Advanced Programming

Notices

 
 
Thread Tools Display Modes
  #1  
Old 10-20-2006, 12:51 AM
Yokura Yokura is offline
n00bzilla
 
Join Date: Oct 2006
Posts: 5
Yokura is on a distinguished road
A little help......? (MySQL)

I'm REALLY new to MySQL and PHP. I've gotten the basics of MySQL down, but I still can't code from stratch. >.>;

Anyways, I've been trying to organize my avatars, but it keeps on messing up. >.<; The layouts and banners are ok, but the avatars is giving me a headache........

Later, I'll be trying to organize them by series and other stuff. But for now, I'll stick with basics.......

If it'll help,

http://deadly-beauty.com/Avi100.php

that's what it currently looks like. It's ok for two avatars, but if I put more than 4, it extends. making it unorganized. How do I fix that?
Sponsored Links
  #2  
Old 10-20-2006, 01:57 PM
pb&j's Avatar
pb&j pb&j is offline
phantom
 
Join Date: Dec 2001
Location: lurking about
Posts: 9,995
pb&j is a name known to allpb&j is a name known to allpb&j is a name known to allpb&j is a name known to allpb&j is a name known to allpb&j is a name known to all
i think you would have to provide what you are doing so far to organize the items in MySQL as we dont have access to view your database itself.
__________________
phantom of the forum! mwa-ha-ha!
  #3  
Old 10-20-2006, 11:13 PM
Yokura Yokura is offline
n00bzilla
 
Join Date: Oct 2006
Posts: 5
Yokura is on a distinguished road
Code:
<?php include('header.php');?> 

<p class="head">100x100 Avatars</p>

<center>
<table cellspacing="5px"><tr>

<?php 

$host = "localhost"; 
$connection = mysql_connect("mysql18.servage.net", 
                            "", 
                            ""); 
mysql_select_db("", $connection); 

//This selects ALL the data from the table, 'Avi100' 
$QueryName = mysql_query("select * from Avi100 ORDER BY `id` DESC LIMIT 0, 4"); 

//Your PHP script will stop executing if your query is wrong. 
if ($QueryName != TRUE) 
{ 
die("Query $QueryName failed."); 
} 

//This fetches the information from QueryName as an array. 
while($row=mysql_fetch_array ($QueryName)) 
{ 
//List all of the field names of your table as an array to output. 
$type=$row["type"]; 
$avatar=$row["avatar"]; 


echo "<td width='25%'><table style='margin-bottom: 0px' cellspacing='0px'><tr><td class='avihead' style='margin-bottom: 0px'>$type</td></tr><tr><td class='avi100' style='margin-top:0px;'><img src='$avatar'></td></tr></table></td>"; 


} 
?> 

</tr></table>
</center>

<?php include('footer.php');?>
you mean that?
I have:

id
type
avatar

for the fields.
 

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql database host Seto311 Advanced Programming 2 05-04-2006 03:14 PM
apache 2.0.53, mysql 4.0.22, php 5.0.3 bejayel User Submitted Tutorials 2 07-07-2005 07:14 AM
MySQL configs... agent_x Advanced Programming 1 12-15-2004 02:29 AM
Installing Apache, PHP, and MySQL on Windows sebluver User Submitted Tutorials 1 02-29-2004 09:22 PM
Getting mysql working DisturbedOne User Submitted Tutorials 0 12-10-2003 09:41 PM


All times are GMT. The time now is 03:13 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.