473,797 Members | 3,079 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Im Having Trouble With A MySpace Clone Script

1 New Member
Error on the Home Page Above The Header:
Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result resource in /home/content/s/k/e/skeem/html/space4me/functions.php on line 42

Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result resource in /home/content/s/k/e/skeem/html/space4me/functions.php on line 50

Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/k/e/skeem/html/space4me/functions.php:4 2) in /home/content/s/k/e/skeem/html/space4me/index.php on line 73

Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result resource in /home/content/s/k/e/skeem/html/space4me/functions.php on line 76

Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result resource in /home/content/s/k/e/skeem/html/space4me/functions.php on line 77
Here is the error before the footer:
Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result resource in /home/content/s/k/e/skeem/html/space4me/functions.php on line 130

Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result resource in /home/content/s/k/e/skeem/html/space4me/functions.php on line 131

Here is the code they refer to, it seems to be the same call or function for each error:

This is lines 38 to 50
[PHP]
function sql_execute($sq l_query,$wtr){
global $conn_id;
$sql_res=mysql_ query($sql_quer y,$conn_id);
if($wtr=='get') {
if(mysql_num_ro ws($sql_res)){ <====PROBLEM LINE
return mysql_fetch_obj ect($sql_res);
}
else {
return '';
}
}
elseif($wtr=='n um'){
return mysql_num_rows( $sql_res); <====PROBLEM LINE
[/PHP]

Here are lines 72 to 78:

[PHP]$sql="select * from banners where b_blk='N' and b_typ='H' and b_exp='N'";
$res=mysql_quer y($sql); <====PROBLEM LINE
$dis=array();
$dis_id=array() ;
$num=mysql_num_ rows($res); <=====PROBLEM LINE
if(mysql_num_ro ws($res)) { <=====PROBLEM LINE
while($row=mysq l_fetch_object( $res)) {

Here are lines 130 and 131:

$num=mysql_num_ rows($res);
if(mysql_num_ro ws($res)) {[/PHP]


To me it seems to be the same problem over and over again, but Im new to all of this. Any help would be appreciated.

Thanks in advance.
Matt
Nov 11 '08 #1
1 1660
mwasif
802 Recognized Expert Contributor
Make sure the query is valid and running properly
Expand|Select|Wrap|Line Numbers
  1. select * from banners where b_blk='N' and b_typ='H' and b_exp='N'
Use mysql_error() to know the error if any in this way
[PHP]$res=mysql_quer y($sql) or die("Error in query: ". mysql_error());[/PHP]
Nov 12 '08 #2

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

Similar topics

4
3839
by: PD | last post by:
Hello everyone, I had posted a question regarding how to design high traffic fast dating website on different PHP groups. I got a lot of useful responses. I have added links to all the posts below for reference. I am back with another question regarding the dating website. How do I go about creating personal user url on the site like it is done on MySpace.com
2
2495
by: tony | last post by:
I am trying to use a form with a button that calls a verification script but can't seem to get the script to run at all - can anyone tell me if this SHOULD work in a forms onCLick or have I got the syntax wrong? The function is previously included with include_once('library.php'); This seems to work ok. I dont get any php errors if I turn on reporting. The function checks out ok on its own. I've also tried a simple echo with no luck....
1
6685
by: jaktharkhan | last post by:
Hi, I really really need help in trying to figure out how can I do a CloneNode on an Iframe where the cloned IFRAME clones with all its contents?. Basically what I am doing is dynamically building a table with Iframes inside it. The problem is I just want to build one Iframe because the contents of it can be very complex. After my Iframe is built I just want to clone the iframe as many times as I need later. I cannot use an HTML file and...
0
2438
markmcgookin
by: markmcgookin | last post by:
Hi Folks, First off, Happy New year to all! This is a bit of a strange question, now I am a fairly accomplished .asp and .html web developer, and very computer literate, and I have recently decided to join the masses on myspace.com (boo hiss... I know!) and as nice and simple as it is, it is frustrating. Now I am wondering if there is anyone here that has, or knows of somewhere to get myspace templates that are not the silly automated...
7
3930
by: webgyrl | last post by:
Hi, I am helping a musician friend of mine with his profile and I found a cool layout on Nas' MySpace page. I changed some things and re-did the graphics and I basically popped my Image URLS where the ones were in Nas' profile code. Something strange is happening tho. When I try to preview the layout, the entire profile is all covered up. My images show, but all the other elements have disappeared. I am not sure where in the CSS I...
2
1099
by: growlme | last post by:
Hey People.. I am trying to incorporate a list rollover into a myspace profile.. I know.. myspace.. my apologies but i've been asked to do it. The problem is this.. to have an image appear at some absolute position on the page, when elements of a list are rolled-over.. An example of something similar appears here.. (well so it seems to me).. Derek Where the desired outcome is to have the pic of his face change to those respective of...
1
2690
by: ced69 | last post by:
having trouble getting marquee to work get object required errors tring t <title>This Month at the Chamberlain Civic Center</title> <link href="styles.css" rel="stylesheet" type="text/css" /> <script src="Dunbarlab9.js" type="text/javascript"></script> <script type="text/javascript">
5
13385
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the website URL before the image URL.
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10468
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10245
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10205
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.