473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

I need another set of eyes to find my error :oops:)

Here is my error

Expand|Select|Wrap|Line Numbers
  1. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/truthat/public_html/verukasalt/admin/main.php(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(2) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 
  2.  
I can't find the error - any help available today. Here is the code

Expand|Select|Wrap|Line Numbers
  1. <?
  2.  
  3. include "admin/db.php";
  4.  
  5. $x1 = mysql_query("select * from linkscript_words order by rand()");
  6. $row = @@mysql_fetch_array($x1);
  7.  
  8. echo "<span style=\"line-height: 200%; font-size: 14px; letter-spacing: 2px; word-spacing: 5px; margin-top: 5; margin-bottom: 5;\">";
  9.  
  10. while($row) {
  11.  
  12.     $wid = $row['wid'];
  13.     $text = $row['text'];
  14.     $taken = $row['taken'];
  15.  
  16.     if($taken==0) {
  17.         $ahref = str_replace(" ","-",$text);
  18.         $ahref= $wid . "-claim-" . $ahref . ".html";
  19.         echo "<a href=\"$ahref\">$text</a>&nbsp;";
  20.     }
  21.  
  22.     else {
  23.         $var1 = mysql_query("select * from linkscript_addons where wid='$wid'");
  24.         $res = @mysql_fetch_array($var1);
  25.  
  26.         $link = $res['link'];
  27.         $mouseover = $res['mouseovertext'];
  28.         $customcolor = $res['customcolor'];
  29.         $fontcolor = $res['fontcolor'];
  30.         $fontsize = $res['fontsize'];
  31.         $name = $res['name'];
  32.  
  33.         $ahref = "<a href=\"$link\" title=\"$mouseover\" target=_blank>";
  34.         if($customcolor)
  35.             $ahref .= "<font color=\"#" . $customcolor . "\"";
  36.         else if($fontcolor==1)
  37.             $ahref .= "<font color=\"#000000\"";
  38.         else if($fontcolor==2)
  39.             $ahref .= "<font color=\"#008080\"";
  40.         else if($fontcolor==3)
  41.             $ahref .= "<font color=\"#00FF00\"";
  42.         else if($fontcolor==4)
  43.             $ahref .= "<font color=\"#800000\"";
  44.         else if($fontcolor==5)
  45.             $ahref .= "<font color=\"#FF0000\"";
  46.         else if($fontcolor==6)
  47.             $ahref .= "<font color=\"#000080\"";
  48.         else if($fontcolor==7)
  49.             $ahref .= "<font color=\"#A8B7F2\"";
  50.         else if($fontcolor==8)
  51.             $ahref .= "<font color=\"#FF9900\"";
  52.         else if($fontcolor==9)
  53.             $ahref .= "<font color=\"#800080\"";
  54.         else if($fontcolor==10)
  55.             $ahref .= "<font color=\"#000000\"";
  56.  
  57.         if($fontsize==2)
  58.             $ahref .= " size=3";
  59.         else if($fontsize==3)
  60.             $ahref .= " size=4";
  61.         else if($fontsize==4)
  62.             $ahref .= " size=5";
  63.  
  64.         $fontdecoration = $res['fontdecoration'];
  65.  
  66.         if(strstr($fontdecoration,"1"))
  67.             $f1 = 1;
  68.         else
  69.             $f1 = 0;
  70.         if(strstr($fontdecoration,"2"))
  71.             $f2 = 1;
  72.         else
  73.             $f2 = 0;
  74.         if(strstr($fontdecoration,"3"))
  75.             $f3 = 1;
  76.         else
  77.             $f3 = 0;
  78.         if(strstr($fontdecoration,"4"))
  79.             $f4 = 1;
  80.         else
  81.             $f4 = 0;
  82.  
  83.         if(strstr($ahref,"<font"))
  84.             $ahref .= " style=\"";
  85.         else
  86.             $ahref .= "<font style=\"";
  87.  
  88.         if($f1==1)
  89.             $ahref .= "font-weight: bold;";
  90.         if($f2==1)
  91.             $ahref .= "font-style: italic;";
  92.         if($f3==1)
  93.             $ahref .= "border-top: thin solid #000000;";
  94.         if($f4==1)
  95.             $ahref .= "text-decoration: underline;";
  96.  
  97.         $ahref .= "\">$text</font></a>&nbsp;";
  98.  
  99.         echo $ahref;
  100.     }
  101.  
  102.     $row = @mysql_fetch_array($x1);
  103. }
  104. echo "<p align=\"center\"><a href=\"suggest.php\"><font size=\"2\" color=\"#000000\">Suggest a word</font></a></p>";
  105. echo "</span>";
  106.  
  107. ?>
  108.  
Aug 11 '07 #1
3 1295
Atli
5,058 Expert 4TB
Are you sure this is the code that is generating the error?
There is no mysql_num_rows() or eval() in there.
Aug 11 '07 #2
nope not sure now. will take another look at another code. Thanks for looking
Aug 11 '07 #3
pbmods
5,821 Expert 4TB
Heya, saundra.

Any luck?
Aug 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Prasad Patil | last post by:
Hi I am working on ASP.Net / C# web application, i need to fine the time taken to complete the request for a page in web browser. e.g. http://www.anyurl.com/default.aspx I need to find the...
1
by: Meena Lalwani | last post by:
Hi All, I am working on the performance measurement for my dot net application. There are 5000 to 10000 users who logged in with my application. I am able to find out which user logged in ,...
1
by: ysn | last post by:
Hi , i have 2 tables in Acees, table A is Company and table B is Merging_Company. Company Contains the following fields CODE , DESCRIPTION , UNIT ID Table Merging_Company...
1
by: alf | last post by:
Hi, I need to find all modules/lib from the site-packages along with the versions. Is there a way to determine physical path to the module? And is there is a way to identify all potential...
1
by: kdpo1990 | last post by:
I've worked with ASP.NET apps. for a long time, but now, i have to figure out how to do same in win app. I need to find a way to lock or freeze table column in datagrid. This is a link to an...
2
by: yuval | last post by:
I need to find the rows that exist in one table but not in the other with this condition: (prod_name exist in table1 and not in table2.prod_name ) AND (prod_name exist in table1 and not in...
1
by: aknoch | last post by:
My basic situation is this - I ONLY want duplicates, so the opposite of DISTINCT: I have two tables. Ordinarily, Table1ColumnA corresponds in a one to one ratio with Table2ColumnB through a...
2
by: dougmcmurtry | last post by:
I have a web app that is going on a touch screen computer with no keyboard, so I have to allow them to enter numeric data into text fields through a UserControl that I built. All I need to find is...
4
by: Angus | last post by:
I have a map between an integer value - call it a deviceID and a device name - call it devicename. If I use a map I can either use the int or the string as the key. But which? If I use for...
1
by: vetrib2w | last post by:
Hi friends, I need to find the record size when i m fetching the data from mysql table . example: id|name | details| 1 |vetri | b2w | 2| peter | dog | query: SELECT * FROM example where...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.