Jump to content

Echo Of A Sql Str Doesn't Work.


Raptor829

Recommended Posts

I m working on a site that someone else built. The former programmer used a echo of a sql query to produce a scroll effect across the screen. For some reason its not working.

 

<?php require ('qmbl.php');
$sqlstr = "select i_html from SiteInfo where i_type = 'NEWS_SCROLL'";
$rs_scroll = mysqli_query($sqlstr, $cid);
$scroll = mysql_result($rs_scroll,0,0);

$sqlstr = "select team_id, t_name from Team t, Settings s where t.t_season = s.cur_season order by t_name";

$rs_teams = mysql_query($sqlstr, $cid);

$count=0;

$templateTeams="";

while($row = mysql_fetch_assoc($rs_teams)){$templateTeams .= '<a href="team.php?t='.$row['team_id'].'">'.$row['t_name'].'</a><br />';

} //end while ?>

 

 

Any help will be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/269488-echo-of-a-sql-str-doesnt-work/
Share on other sites

  Quote
$rs_scroll = mysqli_query($sqlstr, $cid);

 

^^^ Someone added an i to your mysql_query() statement. The mysql (no i) and mysqli (with an i) statements cannot be mixed on the same connection and it takes more than just adding an i to convert from mysql to mysqli statements.

Like I said before, the scroll effect is in a different language, not the one you posted. It's in a whole other file, processed on another computer, and works in a different way.

 

Get firebug or chrome developer tools and check the JS console for errors.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.