obey-robots.txt
pHpFusion Nederlands (BE|NL) Ľ Ondersteuning, Themas, Infusies, Modificaties en Installatie 23 Maart 2019, 21:45 | Search | Contact | najdi
Navigatie
» pHp-Fusion Start

» FAQ
» Reglement

» Forum
» Contact
» Zoeken
» Artikelen
» Weblinks

» Thema's
» Infusions & Mods
» Nieuws CategorieŽn

» PHP-Fusion Downloads
» PHP-Fusion Vergunning
» PHP-Fusion Link Portal

Shoutbox
U moet ingelogd zijn om een bericht te plaatsen.

28 december 2018, 21:42
ROFL

01 januari 2018, 10:29
Gelukkig en gezond 2018 toegewenst iedereen

09 november 2016, 23:46
Groeten vanuit Belgie, ondertussen weer een aantal jaartjes geleden Wink

29 maart 2016, 09:44
Hey haggis, sup

28 maart 2016, 22:34
Hi there.


Extra Downloads

Nieuwste Downloads:

» PHP-Fusion 7.02.07 FIX voor...
» Squirrel Mail Panel
» Dropline Navigation Panel
» News 2 Articles converter
» Multi Contact Panel
» Camamba Panel
» Avatar Panel
» WebInsta MaiLing (WIML) Inf...
» Pro beheer paneel
» V7.02.04 update + Dutch locale

Top 5 Downloads:

» V7.02.04 full core + D... [775]
» DHTML Menu V7 [599]
» V7.02.04 update + Dutc... [591]
» WebInsta MaiLing (WIML... [449]
» Photoalbum Mass Upload [427]

Populaire Fusion sites
» CaiWay Gebruikers.
» KPN Gebruikers.
» Online Gebruikers.
» Tele2 Gebruikers.
» Ziggo Gebruikers.

pHp-Fusion sites
» Php-Fusion.Asia
» Php-Fusion.Cn
» Php-Fusion.Fr
» Php-Fusion.In
» Php-Fusion.Org
» Php-Fusion.Start-Pages.Com
» Start-Pages.Com

Onderwerp bekijken
 Onderwerp afdrukken
PHP-MySQL Help
afoster
This is not a php-fusion issue and hope that someone can help me with this problem. I am trying to use the attached file to pull data from mysql tables without the use of maincore.php. I would like the data to be pulled into 3 columns as this file does. Any assistance would be much appreciated.

afoster voegde bij, bestand:
3columns.zip [1.06KB / 4 Downloads]
 
douwe_yntema
I Looked at your file, but you are saying pulling data from a table without use of maincore.php, but maincore.php is included in your script, in line 13.

furthermore the name fusion_players18 is the name of the database as a constant, but is this constant declared somewhere? Not in your script. There should be something like:
define("FUSION_PLAYERS18", DB_PREFIX."players18"Wink; or use the name as a string, so it would be "fusion_players18" with quotes
Constants are always in capitals.

Keep in mind you are making a database connection in line 8, but are also including maincore on line 13, but on maincore there is also a connection made to a database. You can only have one connection active at a moment, so after calling maincore.php, your connection in line 8 is lost.

with mysqli_select_db you can select different database on same connection. In the past I made a script to switch to another database via another connection, but that was with mysql, not mysqli. You had to force a new connection by adding a parameter True for option force new link. But mysql is deprecated now. I don't know if this works with mysqli

Hope I pointing you some directions.

btw: What exactly goes wrong with your scrip? Smile
 
http://www.douwe.schoonheidssalonanneke.nl
afoster
douwe_yntema schreef:

I Looked at your file, but you are saying pulling data from a table without use of maincore.php, but maincore.php is included in your script, in line 13.

furthermore the name fusion_players18 is the name of the database as a constant, but is this constant declared somewhere? Not in your script. There should be something like:
define("FUSION_PLAYERS18", DB_PREFIX."players18"Wink; or use the name as a string, so it would be "fusion_players18" with quotes
Constants are always in capitals.

Keep in mind you are making a database connection in line 8, but are also including maincore on line 13, but on maincore there is also a connection made to a database. You can only have one connection active at a moment, so after calling maincore.php, your connection in line 8 is lost.

with mysqli_select_db you can select different database on same connection. In the past I made a script to switch to another database via another connection, but that was with mysql, not mysqli. You had to force a new connection by adding a parameter True for option force new link. But mysql is deprecated now. I don't know if this works with mysqli

Hope I pointing you some directions.

btw: What exactly goes wrong with your scrip? Smile


I was not very clear in my post. The file I attached worked fine if I use maincore.php. It does not work however, if maincore.php is not there. What I want to do is use the file to use in a folder that is not php-fusion based, and therefore would not use maincore.php.

I will review your post to see if I can make sense of what you said, since I am not very good at php. I thank you for taking the time to respond.
 
afoster
douwe_yntema schreef:

I Looked at your file, but you are saying pulling data from a table without use of maincore.php, but maincore.php is included in your script, in line 13.

furthermore the name fusion_players18 is the name of the database as a constant, but is this constant declared somewhere? Not in your script. There should be something like:
define("FUSION_PLAYERS18", DB_PREFIX."players18"Wink; or use the name as a string, so it would be "fusion_players18" with quotes
Constants are always in capitals.

Keep in mind you are making a database connection in line 8, but are also including maincore on line 13, but on maincore there is also a connection made to a database. You can only have one connection active at a moment, so after calling maincore.php, your connection in line 8 is lost.

with mysqli_select_db you can select different database on same connection. In the past I made a script to switch to another database via another connection, but that was with mysql, not mysqli. You had to force a new connection by adding a parameter True for option force new link. But mysql is deprecated now. I don't know if this works with mysqli

Hope I pointing you some directions.

btw: What exactly goes wrong with your scrip? Smile


BTW, you can see the result of the file I sent you using maincore.php here. http://fredsfolli...rs19_2.php
 
douwe_yntema
Untested version attached

https://www.w3sch...mysqli.asp

douwe_yntema voegde bij, bestand:
3columns_modified.zip [1.18KB / 3 Downloads]
 
http://www.douwe.schoonheidssalonanneke.nl
afoster


Thanks for your help on this and the file you attached. Unfortunately it only pulls the user name in the table and only in the first column. I am attaching a screen shot of a portion of the page to give you an idea of what I am describing.

I also noticed that the link you send from w3schools.com is for php7, my host is running 5.63 which is probably the reason your file is not working properly.

afoster voegde bij, afbeelding: (Klik het plaatje voor vergroting!)
3columns.jpg

Gewijzigd door afoster op 26 februari 2019, 16:26
 
douwe_yntema
I am sorry, there was a typo in the file.
Like I said it was untested.

Corrected version attached

douwe_yntema voegde bij, bestand:
3columns_modified_2.zip [1.19KB / 3 Downloads]
 
http://www.douwe.schoonheidssalonanneke.nl
afoster
Works perfectly, thank you so much. I will now adapt the file to work in a folder that is in no way related to php-fusion. I have a good feeling that it will work.
 
Spring naar forum:
Nieuw onderwerp Beantwoorden

Gebruik BBcode of HTML om naar; 'PHP-MySQL Help', te verwijzen!
BBcode:
HTML:

Vergelijkbare onderwerpen
Onderwerpen Forum Antw. Laatste bericht
Hulp gevraagd bij mysql DB en PHP pagina's website Algemene v7 support 3 06 november 2014, 09:30
Mysql Algemene v7 support 3 17 februari 2013, 22:09

Inloggen / Registreren
Gebruikersnaam

Wachtwoord



Nog geen lid?

» Registreer «
Als geregistreerd lid kunt u reageren en alle extra functies gebruiken.

Wachtwoord vergeten?
Verzoek nieuw wachtwoord.

Gebruikers Online
» Gasten online: 1

» Leden online: 0

» Totaal aantal leden: 1,211
» Nieuwste lid: gaboe

Laatst geziene leden
» barman-produc...< 5 mins
» douwe_yntema08:07:12

Doneren


Promoot je website
Ad-Vertise hoe werkt het? Registreer, selecteer "Advertenties Nederland" en maak een eigen tekst advertentie. Kies een ad formaat, pas de kleuren aan en plaats html code op je eigen website. Nu worden jouw advertenties vertoont op alle deelnemende websites die ůůk voor Advertenties Nederland hebben gekozen. Bekijk advertentie formaten.
Hieronder "Advertenties BelgiŽ", deze advertenties worden vertoont op alle deelnemende websites die ůůk voor Advertenties BelgiŽ hebben gekozen. Bekijk advertentie formaten..

Laatste Downloads
» PHP-Fusion 7.02.07 update v...
» PHP-Fusion v7.02.07
» Cookie Controle 1.0
» PHP-Fusion v7.01.02 upgrade...
» PHP-Fusion v7.01.01 upgrade...

7,750,359 bezoeken