Jump to content

vethost

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

vethost's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=379754:date=Jun 3 2006, 06:41 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 3 2006, 06:41 PM) [snapback]379754[/snapback][/div][div class=\'quotemain\'][!--quotec--] After the mysql_query() call. [/quote] Thanks. I tried adding it several times in different ways and get "Parse error: parse error, unexpected T_STRING"
  2. [!--quoteo(post=379676:date=Jun 3 2006, 02:06 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 3 2006, 02:06 PM) [snapback]379676[/snapback][/div][div class=\'quotemain\'][!--quotec--] I don't think that's the problem -- if your query is failing for some reason, you'd get the same error. Try adding "or die mysql_error()" and see what you get. [/quote] I am a noob. Where exactly do I put that snippet? Thanks!
  3. I read in the PHP site, "For downward compatibility mysql_selectdb() can also be used. This is deprecated however." I'm trying to install a third-party script, but keep getting this error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/user/www/base_top_v.php on line 16 The code snippet including Line 16 in base_top_v.php reads: <? $accounts = mysql_query("select * from banners where id >= '1' order by name asc"); $total_found=mysql_num_rows($accounts); srand(date("s")); $number = rand() % $total_found; if ($number == "0") { $number = 1; } while ($get_rows=@mysql_fetch_array($accounts)) { $ccc = $ccc + 1; if ($ccc == "$number") { $banner_url=$get_rows[banner_url]; $link_url=$get_rows[link_url]; } } ?> I've narrowed it down I think to the use of mysql_select_db() in the script. I am not running the latest version of Mysql, so I was wondering if I should seek out all the occurences of that term and replace it with mysql_selectdb() Any thoughts? I'm running mysql 4.0x
×
×
  • 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.