PHP Nuke Nederland
 
•   Home  •  Downloads  •  Your Account  •  Forums  •
PHP-Nuke Nederland: Forums

PHP-Nuke Nederland :: View topic - DB query
 Forum FAQ  •   Search   •  Memberlist  •  Usergroups   •  Register   •    •  Profile  •  Log in to check your private messages  •  Log in

 
This forum is locked: you cannot post, reply to, or edit topics.This topic is locked: you cannot edit posts or make replies.
View previous topic Log in to check your private messages View next topic
Author Message
TheKiller_Dog
Beginner
Beginner


Joined: Feb 26, 2006
Posts: 22

PostPosted: Tue 07 Mar 2006 2:39 Reply with quoteBack to top

Is het mogelijk om in een module van phpnuke database query's te plaatsen zoja waar moet ik deze dan plaatsen kheb al wat zitten proberen gister maar kom er niet uit.
Tenzij het gewoon een fout is in mn code:

Code:

$sql = "SELECT id,opp,oppsite,mapthem,mapus,scorethem,scoreus,points,wdl,datum FROM codred-2on2blx ORDER BY id DESC";
$res = mysql_query($sql);

if (mysql_num_rows($res) >= 2)
{

$query = "SELECT * FROM codred-2on2blx";
$result = mysql_query($query);
$num = mysql_num_rows($result);
}
View user's profileSend private message
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2836

PostPosted: Tue 07 Mar 2006 3:10 Reply with quoteBack to top

Ja, uiteraard kan dat. PHP en MySQL werken goed samen. Alleen wat je hier plaatst zegt niets over de verbinding met de database. Is die er wel?

Gebruik de standaard globals voor de database:

[php:1:cd2d7961ef]
global $db;
$sql = "SELECT id,opp,oppsite,mapthem,mapus,scorethem,scoreus,points,wdl,datum FROM codred-2on2blx ORDER BY id DESC";
$res = $db->sql_query($sql);

if ($db->sql_numrows($res) >= 2)
{

$query = "SELECT * FROM codred-2on2blx";
$result = $db->sql_query($query);
$num = $db->sql_numrows($result);
}
[/php:1:cd2d7961ef]


BL

_________________
Te Lezen: Forum Regels | Te Gebruiken: Forum Zoek Functie
Aanbevolen PHP-Nuke versie: PHP-Nuke 7.6pl3.1!
Aanbevolen Security AddOn: Nuke Sentinel™
View user's profileSend private messageSend e-mailVisit poster's website
TheKiller_Dog
Beginner
Beginner


Joined: Feb 26, 2006
Posts: 22

PostPosted: Tue 07 Mar 2006 5:15 Reply with quoteBack to top

krijg um nog steeds niet aant lopen :S
View user's profileSend private message
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2836

PostPosted: Tue 07 Mar 2006 5:44 Reply with quoteBack to top

Je bent bezig met het maken van een module. Met bovenstaand ga ik ervan uit dat je enig idee hebt waar je mee bezig bent. En dan werkt alleen bovenstaand niet om de boel aan te gang te krijgen.
Daarvoor heb je iets meer nodig.

zie: http://www.phpnuke-nederland.com/ftopicp-6057.html#6057


BL

_________________
Te Lezen: Forum Regels | Te Gebruiken: Forum Zoek Functie
Aanbevolen PHP-Nuke versie: PHP-Nuke 7.6pl3.1!
Aanbevolen Security AddOn: Nuke Sentinel™
View user's profileSend private messageSend e-mailVisit poster's website
TheKiller_Dog
Beginner
Beginner


Joined: Feb 26, 2006
Posts: 22

PostPosted: Tue 07 Mar 2006 6:26 Reply with quoteBack to top

de module heb ik ja alleen dat uit de database halen lukt me niet
View user's profileSend private message
BlueLion
Administrator
Administrator


Joined: Aug 21, 2004
Posts: 2836

PostPosted: Tue 07 Mar 2006 6:45 Reply with quoteBack to top

Hoe ziet de structuur van de tabel eruit?


BL

_________________
Te Lezen: Forum Regels | Te Gebruiken: Forum Zoek Functie
Aanbevolen PHP-Nuke versie: PHP-Nuke 7.6pl3.1!
Aanbevolen Security AddOn: Nuke Sentinel™
View user's profileSend private messageSend e-mailVisit poster's website
TheKiller_Dog
Beginner
Beginner


Joined: Feb 26, 2006
Posts: 22

PostPosted: Tue 07 Mar 2006 6:48 Reply with quoteBack to top

database tabel?
Code:

CREATE TABLE `codred-2on2blx` (
  `id` int(11) NOT NULL auto_increment,
  `opp` text NOT NULL,
  `oppsite` text NOT NULL,
  `mapthem` text NOT NULL,
  `mapus` text NOT NULL,
  `scorethem` text NOT NULL,
  `scoreus` text NOT NULL,
  `points` text NOT NULL,
  `wdl` text NOT NULL,
  `datum` varchar(16) NOT NULL default '',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;
View user's profileSend private message
TheKiller_Dog
Beginner
Beginner


Joined: Feb 26, 2006
Posts: 22

PostPosted: Wed 08 Mar 2006 3:20 Reply with quoteBack to top

kheb ut geritselt Smile

de fout lag aan de table naam:
codred-2on2blx dat - mag niet :S dus heb ik er maar codred_2on2blx van gemaakt en nu werkt ie Smile

toch bedankt
View user's profileSend private message
Display posts from previous:      
 Donaties   Adverteren 
Wilt u het forum steunen, dan kunt u nu eenvoudig doneren met PayPal.
This forum is locked: you cannot post, reply to, or edit topics.This topic is locked: you cannot edit posts or make replies.
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Web site powered by PHP-Nuke

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004-2008 by BlueLion.
SEO enhanced with the Sitemapper script
You can syndicate our news using the file backend.php or ultramode.txt
Powered by PHP Powered by MySQL Apache Webserver Valid robots.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Pagina rendering: 0.10 seconden


[Valid News RSS]

RSS Feeds:
[RSS 2.0 News Feed]
[RSS 2.0 Download Feed]
[RSS 2.0 Forum Feed]
[RSS 2.0 Link Feed]
:: fisubsilver shadow phpbb2 style by Daz :: PHP-Nuke theme by BlueLion ::