Author |
Message |
mds
Client

Joined: Dec 24, 2004
Posts: 194
Location: Michigan
|
Posted:
Wed Dec 20, 2006 7:37 pm |
|
I'm trying to do this on my own but really have NO idea what i am doing .
i have a working page on my test site but when i ftp it to the website it dont work because of the DB connection difference...I got it to work on the test site which is on my laptop using dreamweaver..here is a link to what works on the test site Only registered users can see links on this board! Get registered or login!
**what i have tried**
ive tried deleting for obvious reasons the connection stuff at the top of the file
('Connections/test.php') and that whole block
tried changing things around to use something like thisbut edited to what i thought would work and no go....$result = $db->sql_query("SELECT id, id_cat, question, answer FROM ".$prefix."_faqanswer WHERE id_cat='$id_cat'");
while ($row = $db->sql_fetchrow($result)) {
ive tried using the php.net manual and mysql manual and i just cant get it
like i said i really have no clue
This is for my Fire Dept. and i do the website stuff as part of my "volunteering" or donation back to the Dept. part and i would really like to get this working and be able to learn/understand how to , to be able to do more like this.....as i want to make an admin side to this as well so the info can be updated easily enough without having to do it directly in the DB.......
Thank You in advance with any help you can offer / do |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Wed Dec 20, 2006 10:42 pm |
|
As phpNuke uses only one database, I suggest you move everything into the phpNuke database and use the Nuke database layer functions. |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Thu Dec 21, 2006 11:47 am |
|
Have you installed PHPnuke even? I can't tell for sure from your posting. If so, what version. Did you run the installation SQL steps from Ravennuke?
As Evaders states, Nuke will make the connection to the database for you but you have to put the necessary connection information in a file called config.php first. You can't even do an installation without doing this.
It almost looks like you are trying to write your own module. That's something that can be done but first things first, try to get a working installation of standard Nuke first and we can go from there. |
|
|
|
 |
mds

|
Posted:
Thu Dec 21, 2006 12:20 pm |
|
sorry i was tired as all get out when i wrote this..
version number shows 7.6 but i am pretty sure its RavenNuke76 v2.02.02 Distro just the table wasnt updated...
i am trying to do this as a module which i want to be able to update and add via admin panel
i have created the table allready in the same DB as the rest of the site
the site has been and running for about 2yrs now its here nocfa.org
evaders99
lol i have no idea what your talking bout lol ...i am trying but i know i am in over my head.......tho i will have a look for it tonight when i get back home from work.....hi ooo off to paint more cars i go.........
and thanks for the replies and sugestions .. |
|
|
|
 |
fkelly

|
Posted:
Thu Dec 21, 2006 3:55 pm |
|
Telling you how to create a module that has an administrative component goes well beyond what can be accomplished in a Forum. Or at least by me
You might want to check out Chris Karakas' how to manual at:
Only registered users can see links on this board! Get registered or login!
There is quite a bit in there about module construction. |
|
|
|
 |
mds

|
Posted:
Thu Dec 21, 2006 6:17 pm |
|
fkelly wrote: | Telling you how to create a module that has an administrative component goes well beyond what can be accomplished in a Forum. Or at least by me
You might want to check out Chris Karakas' how to manual at:
Only registered users can see links on this board! Get registered or login!
There is quite a bit in there about module construction. |
i have tried that as well ....well the nuke manual here that tells about creating a module....guess i'll have to try again from scratch ...right now i would just like to get the info to display ......hmmm i didnt know bout Chris's manual...looking now.. |
|
|
|
 |
mds

|
Posted:
Thu Dec 21, 2006 8:05 pm |
|
ok i think i am finally getting somewhere........following chris's how to ..to the T...i am finally getting the info displayed......my question is in this string from here http://www.karakas-online.de/EN-Book/module-public.html
$resultpersons = sql_query("SELECT idperson, nameperson FROM "$prefix."_topolino", $dbi);
for ($m=0; $m < sql_num_rows($resultpersons, $dbi); $m++){
list($idperson, $nameperson) = sql_fetch_row($resultpersons, $dbi);
echo "$idperson - $nameperson < br >";
}
where or what does the $resultpersons come from ? i see in all modulesname/index.php somewhere has a $result"name" what does this represent or how does 1 come up with this "name"
now where can i go to figure out how to display my info in the table i created ?
Thanks |
|
|
|
 |
evaders99

|
Posted:
Thu Dec 21, 2006 10:28 pm |
|
First, move your tables into the phpNuke database. Delete all the connections code, all we need is the query code
Instead of
mysql_query -- use $db->sql_query
mysql_fetch_assoc -- use $db->sql_fetchrow
mysql_num_rows -- use $db->sql_numrows
Finally, I would remove all the junk DOCTYPE, HTML, HEAD, BODY tags. They aren't necessary as phpNuke will generate them |
|
|
|
 |
mds

|
Posted:
Fri Dec 22, 2006 5:59 pm |
|
evaders99 wrote: | First, move your tables into the phpNuke database. Delete all the connections code, all we need is the query code
Instead of
mysql_query -- use $db->sql_query
mysql_fetch_assoc -- use $db->sql_fetchrow
mysql_num_rows -- use $db->sql_numrows
Finally, I would remove all the junk DOCTYPE, HTML, HEAD, BODY tags. They aren't necessary as phpNuke will generate them |
yup i had allready had the tables where they needed to be and the info in them.. last night i was able to get it to be displayed ...i just need to get to be displayed in the table layout of that file...i updated that txt file and show you what i have this far and the layout of how i would like to have it displayed.... |
|
|
|
 |
mds

|
Posted:
Sun Dec 24, 2006 11:28 am |
|
ok so i got a somewhat working module now ...it atleast displays the info i want in the table like i wanted......but......now theres a theme issue that mess's up the way it is displayed (the 1 i noticed with was mtecnic xmas theme).....is this an actual theme issue or is there something missing in my file to correct this ???
working file.txt is here Only registered users can see links on this board! Get registered or login!
have a look and tell me how i did for doing it for the first time....it's an edited version of the nsngroups/public/GRDefault........
ahhhh xmas eve and off to do some more editing of that file.......
MERRY CHRISTMAS EVERYBODY |
|
|
|
 |
|