473,320 Members | 1,823 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,320 software developers and data experts.

Web Site

I am getting a error at greatvideos2.com

The code is below it has to do with the array

<?php
include("include/config.php");
session_start();
include("include/function.php");

# Find the vote information
$mydate= date('Y-m-d');
$sql ="select * from poll_question where start_date<='$mydate' and
end_date>='$mydate'";
$rs = $conn->Execute($sql);
$x=$rs->getarray();
$list=explode("|", $x[0]['poll_answer']);
STemplate::assign('poll_id',$x[0]['poll_id']);
STemplate::assign('poll_qty',$x[0]['poll_qty']);
STemplate::assign('list',$list);

//PAGING
$items_per_page=($config['rows_per_page']*$config['cols_per_page']);
$sql="SELECT * from video where type='public' and featured='yes' order
by addtime desc";
$rs = $conn->Execute($sql);
if($rs->recordcount()>0)$users = $rs->getrows();
//END PAGING

$sql1 = "select VID, title, viewtime, vkey from video where
viewtime<>'0000-00-00 00:00:00' order by viewtime desc limit 0, ".
$config['recently_viewed_video'];
$rs_v = $conn->execute($sql1);
$recent = $rs_v->getrows();
STemplate::assign('recent', $recent);
STemplate::assign('recent_total', count($recent));

if ($_REQUEST['msg']!=""){
$msg=$_REQUEST['msg'];
}

STemplate::assign('err',$err);
STemplate::assign('msg',$msg);
STemplate::assign('answers',$users);
STemplate::assign('total',$rs->recordcount());
$sql="SELECT * from video where type='public' order by addtime desc
limit 100";
$tags=group_tags($sql);
STemplate::assign('tags',$tags);
STemplate::assign('head_bottom',"homelinks.tpl");

if($config['enable_package']=="yes" and $_SESSION['UID']!="")
{
$sql = "select * from subscriber where UID=$_SESSION[UID]";
$rs = $conn->execute($sql);
$u_info = $rs->getrows();
STemplate::assign('u_info', $u_info[0]);
$rs->movefirst();

$sql = "select * from package where pack_id=".$rs-
>fields['pack_id'];
$rs = $conn->execute($sql);
$pack = $rs->getrows();
STemplate::assign('pack', $pack[0]);
}

STemplate::display('head1.tpl');
STemplate::display('err_msg.tpl');
STemplate::display('search.tpl');
STemplate::display('index.tpl');
STemplate::display('right.tpl');
STemplate::display('footer.tpl');
?>

May 31 '07 #1
1 1555
On May 31, 2:14 pm, Tech360 <Stamm...@gmail.comwrote:
I am getting a error at greatvideos2.com

The code is below it has to do with the array

<?php
include("include/config.php");
session_start();
include("include/function.php");

# Find the vote information
$mydate= date('Y-m-d');
$sql ="select * from poll_question where start_date<='$mydate' and
end_date>='$mydate'";
$rs = $conn->Execute($sql);
$x=$rs->getarray();
$list=explode("|", $x[0]['poll_answer']);
STemplate::assign('poll_id',$x[0]['poll_id']);
STemplate::assign('poll_qty',$x[0]['poll_qty']);
STemplate::assign('list',$list);

//PAGING
$items_per_page=($config['rows_per_page']*$config['cols_per_page']);
$sql="SELECT * from video where type='public' and featured='yes' order
by addtime desc";
$rs = $conn->Execute($sql);
if($rs->recordcount()>0)$users = $rs->getrows();
//END PAGING

$sql1 = "select VID, title, viewtime, vkey from video where
viewtime<>'0000-00-00 00:00:00' order by viewtime desc limit 0, ".
$config['recently_viewed_video'];
$rs_v = $conn->execute($sql1);
$recent = $rs_v->getrows();
STemplate::assign('recent', $recent);
STemplate::assign('recent_total', count($recent));

if ($_REQUEST['msg']!=""){
$msg=$_REQUEST['msg'];

}

STemplate::assign('err',$err);
STemplate::assign('msg',$msg);
STemplate::assign('answers',$users);
STemplate::assign('total',$rs->recordcount());
$sql="SELECT * from video where type='public' order by addtime desc
limit 100";
$tags=group_tags($sql);
STemplate::assign('tags',$tags);
STemplate::assign('head_bottom',"homelinks.tpl");

if($config['enable_package']=="yes" and $_SESSION['UID']!="")
{
$sql = "select * from subscriber where UID=$_SESSION[UID]";
$rs = $conn->execute($sql);
$u_info = $rs->getrows();
STemplate::assign('u_info', $u_info[0]);
$rs->movefirst();

$sql = "select * from package where pack_id=".$rs->fields['pack_id'];

$rs = $conn->execute($sql);
$pack = $rs->getrows();
STemplate::assign('pack', $pack[0]);

}

STemplate::display('head1.tpl');
STemplate::display('err_msg.tpl');
STemplate::display('search.tpl');
STemplate::display('index.tpl');
STemplate::display('right.tpl');
STemplate::display('footer.tpl');
?>
This line:

$rs = $conn->Execute($sql);

is not returning an object. Try a var_dump() on $rs and see what it
really is (if I had to guess it's probably boolean false).

May 31 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Florent | last post by:
Hi, I run a few sites and I want to log in my main site database when/if there is a problem, (like a page not found or an unknown agent). But I don't want to give direct access to my database...
6
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a...
0
by: HackingPSP | last post by:
I saw a lot of requests for a program like this, so I wrote it. Yeah, my site has "PSP software by Auri" but in this case it means "Pretty Sweet Programming" :) There's both a VS2005 add-in and a...
0
by: Wayne Sepega | last post by:
We are using windows 2003 standard server, VSS 2005 and VS 2005 (mostly team dev, but some team arch and suite) We run windows 2003 on our development boxes, this gives us the ability to host...
9
by: CK | last post by:
Hi All, I have a sharepoint site on a box. I can hit the box by going to the ip address http://10.0.0.1/default.aspx but I can not hit it by name. The password dialong box comes up and it rejects...
71
by: Murray R. Van Luyn | last post by:
Hi, Since I have made changes to my website it's been a complete flop. According to the logs, as soon as visitors have downloaded the index page they are off. I can't figure out why? ...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
3
by: DBLWizard | last post by:
Howdy All, Is it possible to have Visual Studio 2005 create a project form an existing hosted website? In other words I want to be able connect via ftp to my website structure and have it pull...
16
by: Ben Sehara | last post by:
Is there any way I can limit the access to my website? I have a site "A" and I want to allow access to it only from site "B" login user. If someone try to access site "A" directory, I want it...
3
by: John Kotuby | last post by:
Hi all, Within an IFRAME of a standard site constructed of mostly static HTM type pages, I am calling up one page from a large ASP.NET 3.5 site. I have precompiled the ASP.NET site and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.