Search     
The Online Community for Aircraft Mechanics!
  
Home Forums Topics Top Headlines Your Account
Directory
· Home
· Audio
· Downloads
· FAQ
· Feedback
· Forums
· News Archive
· Recommend Us
· Search
· Site Map
· Submit News
· Surveys
· Top 10
· Topics
· Web Links
· World News
· Your Account
 
Login
Welcome, Guest
Nickname
Password
(Register)

Membership:
Latest: RAMJETT
Today: 0
Yesterday: 0
Overall: 497

Visitation:
Guests: 8
Members: 0
Total: 8


You are Anonymous user. You can register for free by clicking here
 
Last Seen Members
7793: 6 days ago
jetdoc: 8 days ago
Aviator: 14 days ago
caster: 31 days ago
talal_m7taj_com: 46 days ago
old10hourrefugee: 47 days ago
superg: 59 days ago
audai: 102 days ago
monika: 115 days ago
bycanertk: 120 days ago
ual_tech: 150 days ago
 
Today in Aviation History
1982
The Airbus A300 FFCC is certified, becoming the first wide body airliner with cockpit accommodations for only two to be certified.
2003
A Turkish Airlines plane with 76 passengers and crew on board crashes while coming in to land at Diyarbakir.
 
Site Info
About PlaneDoctor.com
Advertising on this site
 

PlaneDoctor.com :: View topic - problem with Audio module in mainfile.php
 
  Forum FAQ Search Profile

Post new topic Reply to topic
PlaneDoctor.com Forum Index » All about Audio Module » problem with Audio module in mainfile.php   
View previous topic :: View next topic
Authorproblem with Audio module in mainfile.php
soc
Newbie


Joined: Sep 30, 2003
Posts: 2
Location: USA

Reply with quote
Hello there

I just tried to install audio module(i have phpnuke 6.5) , but there are some problems.
I put in mainfile.php this code :

$num = sql_num_rows(sql_query("select * from ".$prefix."_audio_newaudio", $dbi), $dbi);
$modreqa = sql_num_rows(sql_query("select * from ".$prefix."_audio_modrequest where brokenaudio='0'", $dbi), $dbi);
$brokena =sql_num_rows(sql_query("select * from ".$prefix."_audio_modrequest where brokenaudio='1'", $dbi), $dbi);
$content .= "<strong>·</strong> <a href=\"admin.php?op=Audio\">"._AUDIO."</a>: $num
";
$content .= "<strong>·</strong> <a href=\"admin.php?op=audioListModRequests\">"._MODREQAUDIO."</a>: $modreqa
";
$content .= "<strong>·</strong> <a href=\"admin.php?op=audioListBrokenaudio\">"._BROKENAUDIO."</a>: $brokena
";

in the end of the function and before themesidebox($title, $content);

but with this it says me that :

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /virtuals/mysite/public_html/html/includes/sql_layer.php on line 238

Anyone can you help me?

Thanks
PostPosted:
Tue Sep 30, 2003 12:21 pm
Top of PageView users profileSend private message
planedoctor
Site Admin
Site Admin


Joined: Oct 08, 2002
Posts: 306

Reply with quote
Try Copying this directly

Code:
$num = $db->sql_numrows($db->sql_query("select * from ".$prefix."_audio_newaudio"));
   $modreqa = $db->sql_numrows($db->sql_query("select * from ".$prefix."_audio_modrequest where brokenaudio='0'"));
   $brokena = $db->sql_numrows($db->sql_query("select * from ".$prefix."_audio_modrequest where brokenaudio='1'"));
   $content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=Audio\">"._AUDIO."</a>: $num<br>";
   $content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=audioListModRequests\">"._MODREQAUDIO."</a>: $modreqa<br>";
   $content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=audioListBrokenaudio\">"._BROKENAUDIO."</a>: $brokena<br>";


Let me know if you have any other problems

hae.gif Sorry I forgot to apply changes to this code in the download.
_________________
PostPosted:
Tue Sep 30, 2003 2:22 pm
Top of PageView users profileSend private messageVisit posters website
soc
Newbie


Joined: Sep 30, 2003
Posts: 2
Location: USA

Reply with quote
I modified code to this and it works ok now. As i can see it is the same code with this you just posted.


Code:

        $num = $db->sql_numrows($db->sql_query("select * from ".$prefix."_audio_newaudio"));
   $brokena = $db->sql_numrows($db->sql_query("select * from ".$prefix."_audio_modrequest where brokenaudio='1'"));
   $modreqa = $db->sql_numrows($db->sql_query("select * from ".$prefix."_audio_modrequest where brokenaudio='0'"));
   $content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=Audio\">"._AUDIO."</a>: $num<br>";
   $content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=audioListModRequests\">"._MODREQAUDIO."</a>: $modreqa<br>";
   $content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=audioListBrokenaudio\">"._BROKENAUDIO."</a>: $brokena<br>";
PostPosted:
Tue Sep 30, 2003 2:28 pm
Top of PageView users profileSend private message
planedoctor
Site Admin
Site Admin


Joined: Oct 08, 2002
Posts: 306

Reply with quote
Well it's close but the query to the DB has changed in the newer version of Nuke.

Check out this line and look at the query


Code:
$num = sql_num_rows(sql_query("select * from ".$prefix."_audio_newaudio", $dbi), $dbi);


Now here is the new call

Code:
$num = $db->sql_numrows($db->sql_query("select * from ".$prefix."_audio_newaudio"));


See the difference?

I have updated the download file with the new changes! anim_smoke.gif
_________________
PostPosted:
Tue Sep 30, 2003 2:38 pm
Top of PageView users profileSend private messageVisit posters website
Display posts from previous:   
All times are GMT - 4 Hours
Post new topic Reply to topic
PlaneDoctor.com Forum Index » All about Audio Module » problem with Audio module in mainfile.php  

Jump to:  
Key
  You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Click here to view this sites Privacy Policy
© 2002 Planedoctor Web Services All Rights Reserved
Bulletin Board Powered by phpBB © 2001 phpBB Group
Version 2.0.6 of PHP-Nuke Port by Tom Nitzschner © 2002 www.toms-home.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 12314 Seconds