Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
 |
|
|
22.10.2010 15:33 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Habs geändert, geht aber immernoch nicht...
php: |
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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css"
href="style.css">
<title>Ponyhof Ivanhoe</title>
</head>
<body>
<center>
<table width="90%">
<tbody>
<tr>
<th width="15%"><b>Vorschau</b></th>
<th width="15%"><b>Name</b></th>
<th width="15%"><b>Rasse</b></th>
<th width="15%"><b>Geschlecht</b></th>
<th width="15%"><b>Alter</b></th>
<th width="15%"><b>Preis</b></th>
</tr>
<?php include("db.php"); $abfrage = "SELECT * FROM pferd WHERE Besitzer = '' ORDER BY id LIMIT ".$seite.",".$proseite; // Datenabfrage
$ergebnis = mysql_query($abfrage);
while($row = mysql_fetch_object($ergebnis))
{ ?>
<tr>
<td width="15%"> <img
src="%3C?=%20$row-%3Evorschaubild%20?%3E"></td>
<td width="15%"><?php echo"$row[Name]" ?></td>
<td width="15%"><?php echo"$row[Rasse]" ?></td>
<td width="15%"><?php echo"$row[Geschlecht]" ?></td>
<td width="15%"><?php echo"$row[Alter]" ?></td>
<td width="15%"><?php echo"$row[Preis]" ?></td>
</tr>
<?php }
?>
</tbody>
</table>
</center>
</body>
</html>
|
|
|
|
22.10.2010 16:21 |
|
|
Skadi

I LIKE ME THE WAY I AM «3
 

Dabei seit: 20.03.2008
Beiträge: 2.005
Herkunft: Deutschland
 |
|
Probier mal anstatt $row[SPALTE], $row->SPALTE ;D
Mfg; Skadi
|
|
22.10.2010 16:47 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Okay, ich hab den Code von meinem alten vRh genommen...
Wie muss ich $seite und $proseite denn definieren?
|
|
22.10.2010 17:00 |
|
|
Skadi

I LIKE ME THE WAY I AM «3
 

Dabei seit: 20.03.2008
Beiträge: 2.005
Herkunft: Deutschland
 |
|
Was willst du denn damit sagen?
|
|
22.10.2010 17:03 |
|
|
kext
»Ich bin ein HAL 9000 Supercomputer.«
 

Dabei seit: 28.11.2008
Beiträge: 119
Herkunft: Planet Erde
 |
|
Bei LIMIT gibst du an, welcher der erste Datensatz sein soll (beginnend bei null), gefolgt von der Anzahl der Einträge.
LIMIT 0, 10 zeigt die ersten zehn Einträge.
LIMIT 5, 5 zeigt die Einträge 5, 6, 7, 8, 9 und 10.
Für Seite $seite mit $proseite Einträge ist das also:
$abfrage = "... LIMIT ".(($seite - 1) * $proseite).", ".$proseite;
__________________

|
|
22.10.2010 17:06 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Keine Ahnung, das war im Code, den meine damalige MB erstellt hat, ich hab ihn einfach übernommen und mit meinen daten angepasst soweit...
Sieht da so aus: klick
LG
|
|
22.10.2010 17:06 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Ja, die stimmen, für die Steckbriefe nutz ich auch "db.php" und da gehts ja auch...
|
|
22.10.2010 19:46 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
php: |
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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css"
href="style.css">
<title>Ponyhof Ivanhoe</title>
</head>
<body>
<center>
<table width="90%">
<tbody>
<tr>
<th width="15%"><b>Vorschau</b></th>
<th width="15%"><b>Name</b></th>
<th width="15%"><b>Rasse</b></th>
<th width="15%"><b>Geschlecht</b></th>
<th width="15%"><b>Alter</b></th>
<th width="15%"><b>Preis</b></th>
</tr>
<?php include("db.php"); $abfrage = "SELECT * FROM pferd WHERE Besitzer = '' ORDER BY id LIMIT ".$seite.",".$proseite; // Datenabfrage
$ergebnis = mysql_query($abfrage);
while($row = mysql_fetch_object($ergebnis))
{ ?>
<tr>
<td width="15%"> <img
src="%3C?=%20$row-%3Evorschaubild%20?%3E"></td>
<td width="15%"><?php echo"$row[Name]" ?></td>
<td width="15%"><?php echo"$row[Rasse]" ?></td>
<td width="15%"><?php echo"$row[Geschlecht]" ?></td>
<td width="15%"><?php echo"$row[Alter]" ?></td>
<td width="15%"><?php echo"$row[Preis]" ?></td>
</tr>
<?php }
?>
</tbody>
</table>
</center>
</body>
</html>
|
|
|
|
22.10.2010 20:05 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
nope...
"Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '{' or '$' in /users/ponyhofivanhoe/www/pferde/pony/verkaufspferde.php on line 41"
|
|
22.10.2010 20:40 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Muss da nur ein ; hinter?
|
|
22.10.2010 20:51 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Es ändert sich nichts, egal, wo ich die Klammer schließe...
|
|
22.10.2010 21:01 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Ja schon, aber die Klammer steht ja schon in nem php-Tag, also die php-Tags gehen alle auf und zu, nur die doofe Klammer geht nicht wieder zu, aber die Tags sind vollständig...
|
|
22.10.2010 21:09 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Also ich hab das while jetzt in nen eigenen tag gepackt...
Aber die Klammwer ist immernoch alleine...
php: |
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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css"
href="style.css">
<title>Ponyhof Ivanhoe</title>
</head>
<body>
<center>
<table width="90%">
<tbody>
<tr>
<th width="15%"><b>Vorschau</b></th>
<th width="15%"><b>Name</b></th>
<th width="15%"><b>Rasse</b></th>
<th width="15%"><b>Geschlecht</b></th>
<th width="15%"><b>Alter</b></th>
<th width="15%"><b>Preis</b></th>
</tr>
<?php include("db.php"); $abfrage = "SELECT * FROM pferd WHERE Besitzer = ''";
$ergebnis = mysql_query($abfrage); ?>
<?php while($row -> mysql_fetch_object($ergebnis));
{ ?><tr>
<td width="15%"><?php echo " <img src="".$row->"Vorschaubild"."">";
?>
</td>
<td width="15%"><?php echo $row->"Name"; ?></td>
<td width="15%"><?php echo $row->"Rasse"; ?></td>
<td width="15%"><?php echo $row->"Geschlecht"; ?></td>
<td width="15%"><?php echo $row->"Alter"; ?></td>
<td width="15%"><?php echo $row->"Preis"; ?></td>
</tr>
</tbody>
</table>
</center>
</body>
</html>
|
|
|
|
22.10.2010 21:17 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
Ich habs jetzt eingefügt, aber es kommt immernoch das:
"Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '{' or '$' in /users/ponyhofivanhoe/www/pferde/pony/verkaufspferde.php on line 41"
|
|
22.10.2010 21:25 |
|
|
Kullakeeeks

Mitglied
 

Dabei seit: 06.03.2007
Beiträge: 1.591
Herkunft: NRW
Themenstarter
 |
|
php: |
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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css"
href="style.css">
<title>Ponyhof Ivanhoe</title>
</head>
<body>
<center>
<table width="90%">
<tbody>
<tr>
<th width="15%"><b>Vorschau</b></th>
<th width="15%"><b>Name</b></th>
<th width="15%"><b>Rasse</b></th>
<th width="15%"><b>Geschlecht</b></th>
<th width="15%"><b>Alter</b></th>
<th width="15%"><b>Preis</b></th>
</tr>
<?php include("db.php"); $abfrage = "SELECT * FROM pferd WHERE Besitzer = ''";
$ergebnis = mysql_query($abfrage);
while($row -> mysql_fetch_object($ergebnis))
{ ?>
<tr>
<td width="15%"><?php echo " <img src="".$row->"Vorschaubild"."">";
?>
</td>
<td width="15%"><?php echo $row->"Name"; ?></td>
<td width="15%"><?php echo $row->"Rasse"; ?></td>
<td width="15%"><?php echo $row->"Geschlecht"; ?></td>
<td width="15%"><?php echo $row->"Alter"; ?></td>
<td width="15%"><?php echo $row->"Preis"; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</center>
</body>
</html>
|
|
|
|
22.10.2010 21:29 |
|
|
Impressum
|
|