English
PHP, HTML & JavaScript- Forum

data with php from MySQL data base choose

 

Pocowast
my scheduler in the data base has 5 Split: id - cover - timestamp - Text - linkto

now should me php from the slot "titel" any cover heraussuchen, The with "A" begin and among themselves spend, means
1.row "titel x"
2.row "text x"
3.row "titel y"
4.row "text y" etc.

<?php
$_db_host = "localhost";
$_db_username = "username";
$_db_passwort = "passwort";
$_db_datenbank = "datenbank";

# link to data base produce
$_link = mysql_connect($_db_host, $_db_username, $_db_passwort);

# Verify whether The link worked has
if (!$_link)
{
# No, So the whole Skript Cancel !
The("Keine link to data base possible: " .
mysql_error());
}

# link has worked, moreover ...
echo "Verbindung to data base successful.<br>";

# data base select
mysql_select_db($_db_datenbank, $_link);

so far be I now!

who can me moreover help? Opportunities yet nice holidays. LGvP
 
12/25/11  
 



Hiho,

for something like have I me of my Lieblingsfunktionen written: [...] 

so you can easily:
CompileMarkSeparation
;$myArray=dbgetlist("tabelle")
//oder
;$myArray=dbgetlist("tabelle","where timestamp>1000")
//und dann einfach
;$c=count($myArray)
;for ($i=0;$i<$c;$i++) echo $myArray[$i]["titel"]."<br>"

an Where-Clausel The You want would then well where cover like 'A%'
 
12/25/11  
 




Pocowast
Hello IF,
with the dbgetlist have I nothing on The row get, my Solution:

if ($db)
{
$re = mysql_query("SELECT * FROM 01_lexikon WHERE cover like 'A%' ORDER BY titel", $link);

while($data = mysql_fetch_array($re, MYSQL_ASSOC))
{
echo $data["titel"] ."<br>";
echo $data["text"] ."<br><hr>";
}
}

mysql_close($link);

the functions so far integrally well. only have I now the trouble:

in the Text-slot are too Images hinterlegt with html-tags means z.Bspl.

<img src="https://www.pocowast.de/01encyclopedia/image/accurate.jpg" border="1"/>

Why go The not displayed? mandatory I in of my php-File yet what with echo enter and how can I The echo spending yet format?

LGvP
 
12/26/11  
 



set still time to The spending by echo the xmp-day,

means echo "<xmp>".$data["bildhtml"]."</xmp>" -

vlt. is the "Problem" then erkenntlich.

Perhaps. ists too only one addSlashes/ stripSlashes-trouble,

but since I do not white How very You The data into DB registered have...

with the Image would I in example only The URL or quite only whom Bildnamen in

The DB present and the HTML first in the Script produce.
 
12/26/11  
 




Pocowast
Hello IF,
it deals itself circa >>>Vlt. ists too only one addSlashes/ stripSlashes-trouble,!
How can I the to fix? LGvP
 
12/26/11  
 



Zeig still times the besagte spending...

with php::stripslashes ( [...]  ) even.
 
12/27/11  
 




Pocowast
Hello IF,
go time Please to there:  [...] 
and look you whom Seitenquelltext on. as expert see You sure same, what can make, so in of my scheduler the image or. The Images To see are. the should in the view time so similar his, How my jetziger >>>  [...] 
LGvP
 
12/27/11  
 



Müsstest only (How already written) stripslashes on The spending utilize -

quasi instead of echo $stuff just echo stripslashes($stuff)
 
12/27/11  
 




Pocowast
Hi, with the strippen I had already probiert - went always not. now have I times the clinging and Semikolons aufgeräumt, now goes it. thanks. with the Reading be I so far pleased. as nächstes wished I, each cover as link present. if I there again Help need, should I one new Topic make or here moreover write?
LGvP
 
12/27/11  
 



gladly happen.

New-Topic or not-new-Topic simply self decide whether it hold z.B. of Topictitle since yet fit and the old Topic on "erledigt" settle.
 
12/27/11  
 




Pocowast
So I have a list run, with all names, The with B begin and same whom dazugehörenden Text with Show let. there it with the Time yet plenty More Entries give becomes, is these manner the display not meaningfully and it would To many pages go. instead I will now a list with the Titeln abrufen and the have I already ready >>>  [...] 
How can I the echo now procure, that the cover each as link displayed and is if the then functions, what must I yet for statement preparing (if I then on so a finished link click)? have already gegoogelt, but something like in this direction wasn't thereby. Perhaps have your too a german link for my think about. I learn gladly moreover. LGvP
 
12/27/11  
 



well instead of echo $cover."<br>" simply echo "<a href='#'>".$cover."</a><br>" and already are it "Links" -

The lead then but first only moreover to that Page header To navigating.

means instead of href='#' something like How href='?showitem=".$id."'

and the php then $showitem=intval($_GET['showitem']) on the head and the Loop something like How if ($id==$showitem) echo "gewählter entry!"
 
12/27/11  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

28.115 Views

Untitledvor 0 min.
Peter Max Müller vor 16 Tagen
H.Brill01/21/24
Erasmus.Herold01/07/23
Member 834194508/26/21
More...

Themeninformationen

this Topic has 3 subscriber:

iF (9x)
Pocowast (8x)
unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie