php - FromJoomla MySQL Query with where condition on external database -


i have problem query field (avatarurl) database. in joomla module external database. can connect see avatarsurls (images)

<?php    if (!$link = mysql_connect('localhost', 'root', '')) { echo 'keine verbindung zu mysql'; exit; }  if (!mysql_select_db('3d', $link)) { echo 'konnte schema nicht selektieren'; exit; }  $sql    = ' select avatarurl users username = 'username')' ; 

$result = mysql_query($sql, $link);

if (!$result) { echo "db fehler, konnte die datenbank nicht abfragen\n"; echo 'mysql error: ' . mysql_error(); exit; }  while ($row = mysql_fetch_assoc($result)) { echo "<img src='"; echo $row['avatarurl']; echo "' height='100'     width='100' >"; }  mysql_free_result($result);    ?> 

i tried username mod_login. here login greeting code

echo jtext::sprintf('mod_login_hiname', htmlspecialchars($user->get('name')));

but doesnt works in query

need help

so question how can query avatarurl field username greets

echo mysql_result($result,0,0);

this gives 1 avatarurl out.

that solution time.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -