Navigacija

Vartotojų tinkle

Prisijungusių svečių: 122
Prisijungusių narių: 0
Prisijungusių narių nėra

Registruoti nariai: 25,955
Naujausias narys: Johny

Naujausi straipsniai

Paskutiniai nariai

Johny 2 savaitės
Reikalas 3 savaitės
Jaunelis 9 savaitės
lanis 9 savaitės
And2s10 savaitės
Memento Mori15 savaitės
ozzWANTED15 savaitės
Quwqkibor17 savaitės
asirija21 savaitės
tomeem23 savaitės
weberiz26 savaitės
mRokass29 savaitės
kartoonas30 savaitės
iaescortsmap30 savaitės
grunskiz33 savaitės
Bruksnys33 savaitės
illusion33 savaitės
ordo34 savaitės
Jurgaila35 savaitės
originalcs1635 savaitės

Informacija:


OS: Unknown
Naršyklė: Nežinoma
IP: 3.139.83.151
Naujienų: 529
Straipsnių: 235
Temų: 52,588
Postų: 522,528
Postų pask. parą: 0
Shout'ų pask. parą: 0
P.S.C. pask. parą: 0
Nuorodų kataloge: 13

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



Pamiršai slaptažodį?
Paprašyk naujo

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

Jaunelis
2024 Lie. 25 11:07:43
Oho vis dar veikia svetainė akinanti šypsen Šimtas metų, matau Šaukykloje nuostalgija. Smagu panaršyt po forumą ir pažiūrėt senas temas šypsosi

And2s
2024 Lie. 17 19:07:04
2008 pirmą kart čia patekau, man buvo 10m ir čia pramokau programavimo.. smagu skaityti senas žinutes, tokia nostalgija akinanti šypsen ačiū Ozz kad saugoji šitą kultūrinį reliktą šypsosi

ozzWANTED
2024 Sau. 17 01:01:00
Desperatiškus komentarus šaukykloje su accountu po mėnesio prasibuvimo, ištryniau. Pasaulis ir taip juodas. Įjungiam šviesą, prašviesės. šypsosi

Majakas
2023 Gru. 10 19:12:39
Negaliu patikėti jog žinutės/pranešimai visi yra nuo 2008 m akinanti šypsen

Žmogus
2023 Rugs. 7 21:09:14
O gal BloodKiller pasijungs?

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

Taip, bet yra ką taisyti (parašysiu komentaruose)

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
Mano komentarai
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Bendri PHP-F klausimai

Autorius: Gintaxas Peržiūrų: 1831      Spausdinti temą
2011 Sau. 12 21:01:00          1 žinutė iš 6
Spausdinti pranešimą
Sveiki, čia yra kodas, kuris rodo visų žmonių komentarus, kaip reikėtų jį pakeisti, kad rodytų tik mano parašytus?


$i = 0;
$result = dbquery(
"SELECT * FROM ".DB_COMMENTS." LEFT JOIN ".DB_USERS."
ON fusion_comments.comment_name=fusion_users.user_id
ORDER BY comment_datestamp DESC LIMIT 150"

);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
if ($data['user_name']) {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."' class='slink'>".$data['user_name']."</a>";
} else {
echo $data['comment_name'];
}
$comment_message = nl2br(parseubb($data['comment_message']));
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
echo "</span>
<span class='small'> "
.showdate("longdate", $data['comment_datestamp'])."</span><br>
"
.$comment_message."<br>";
 
if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>Skaityti komentarą</a><br>";
}
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>View Article Comment</a><br>";
}
else if ($data['comment_type'] == "P") {
echo "<a href='".BASEDIR."photogallery.php?photo=".$data['comment_item_id']."'>View Photo Comment</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>View Custom Page Comment</a><br>";
}
else {
echo "No link.";
}
 
echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center><br>There are no comments.<br><br></center>\n";
}


http://gameris.lt
2011 Sau. 12 21:01:10          2 žinutė iš 6
Spausdinti pranešimą
gal sitaip
"SELECT * FROM ................. WHERE USERNAME .................


Redagavo avice 2011 Sau. 12 21:01:35
2011 Sau. 12 22:01:00          3 žinutė iš 6
Spausdinti pranešimą
Bet toje vietoje kaip suprantu ima duomenis iš duomenų bazės, tai tavo variantu, imtų iš mano profilio.


"SELECT * FROM ".DB_COMMENTS." LEFT JOIN ".DB_USERS." WHERE user_id='".$_GET['lookup']."
 
ON fusion_comments.comment_name=fusion_users.user_id
 
ORDER BY comment_datestamp DESC LIMIT 150"

 
);



Jei taip norėjai pasakyti tai išmetą tokią klaidą:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE user_id='1 ON fusion_comments.comment_name=fusion_users.user_id ORDER BY' at line 1

There are no comments.

http://gameris.lt
Redagavo Gintaxas 2011 Sau. 12 22:01:54
2011 Sau. 13 22:01:04          4 žinutė iš 6
Spausdinti pranešimą
Argi čia taip sunku, kad niekas nesugeba padėti? Aišku, be užmokesčio niekas nieko nedarys, todėl padėjusiam sumokėsiu 5 lt.

http://gameris.lt
2011 Sau. 14 07:01:46          5 žinutė iš 6
Spausdinti pranešimą

<?php
$i = 0;
 
$result = dbquery(
 
"SELECT * FROM ".DB_COMMENTS."
 
WHERE comment_name = "
.$userdata['user_id']."
 
ORDER BY comment_datestamp DESC LIMIT 150"

 
);
 
if (dbrows($result)) {
 
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
 
while ($data = dbarray($result)) {
 
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
 
 
 
echo "<a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='slink'>".$data['user_name']."</a>";
 
$comment_message = nl2br(parseubb($data['comment_message']));
 
$comment_item_id = $data['comment_item_id'];
 
$comment_type = $data['comment_type'];
 
echo "</span>
 
<span class='small'> "
.showdate("longdate", $data['comment_datestamp'])."</span><br>
 
"
.$comment_message."<br>";
 
 
 
if ($data['comment_type'] == "N") {
 
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>Skaityti komentarą</a><br>";
 
}
 
else if ($data['comment_type'] == "A") {
 
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>View Article Comment</a><br>";
 
}
 
else if ($data['comment_type'] == "P") {
 
echo "<a href='".BASEDIR."photogallery.php?photo=".$data['comment_item_id']."'>View Photo Comment</a><br>";
 
}
 
else if ($data['comment_type'] == "C") {
 
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>View Custom Page Comment</a><br>";
 
}
 
else {
 
echo "No link.";
 
}
 
 
 
echo "</td>\n</tr>\n";
 
$i++;
 
}
 
echo "</table>\n";
 
} else {
 
echo "<center><br>There are no comments.<br><br></center>\n";
 
}

2011 Sau. 14 15:01:18          6 žinutė iš 6
Spausdinti pranešimą
Nu va šitas kodas sutvarkytas. Čia tiems kas nori kiekvieno profilyje matyti to žmogaus parašytus komentarus. Į profile.php failą po paskutinio closetable(); įklijuojat šį kodą.


$i = 0;
$result = dbquery(
"SELECT * FROM ".DB_COMMENTS."
WHERE comment_name = "
.$user_data['user_id']."
ORDER BY comment_datestamp DESC LIMIT 50"

);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
echo "<a href='".BASEDIR."profile.php?lookup=".$user_data['user_id']."' class='slink'>".$user_data['user_name']."</a>";
$comment_message = nl2br(parseubb($data['comment_message']));
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
echo "</span>
<span class='small'> "
.showdate("longdate", $data['comment_datestamp'])."</span><br>
"
.$comment_message."<br>";
if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>Skaityti komentarą</a><br>";
}
 
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>View Article Comment</a><br>";
}
 
else if ($data['comment_type'] == "P") {
echo "<a href='".BASEDIR."photogallery.php?photo=".$data['comment_item_id']."'>View Photo Comment</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>View Custom Page Comment</a><br>";
}
else {
echo "No link.";
}
echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center><br>There are no comments.<br><br></center>\n";
}


http://gameris.lt
Peršokti į forumą: