Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
helmuth

dbquery does not show

by helmuth, Last updated on 6 months ago in Modifications and Requests - 9
I have this code that I want to produce a list of all items:

<?php
$result = dbquery(
 "SELECT 'dagensord_id', 'dagensord_text', 'dagensord_author' FROM 'fusion184Ny_dagensord'"
 );

echo "<div class='list-group-item'>ID: <strong> ".$data['dagensord_id']."</strong><br/></div> ";
echo "<div class='list-group-item'>TEXT: <strong> ".$data['dagensord_text']."</strong><br/></div> ";
echo "<div class='list-group-item'>AUTHOR: <strong> ".$data['dagensord_author']."</strong><br/></div> ";
echo "<div class='list-group-item'><br/></div> ";
?>


but it only shows this:

Quote

Alle citater
ID:
TEXT:
AUTHOR:


What am I doing wrong?
All people are born alike - except Republicans and Democrats.
Groucho Marx
-----------------------------------------
Query are not in data array.
$result = dbquery(
 "SELECT 'dagensord_id', 'dagensord_text', 'dagensord_author' FROM 'fusion184Ny_dagensord'"
 );

to
$data = dbarray(dbquery(
 "SELECT 'dagensord_id', 'dagensord_text', 'dagensord_author' FROM 'fusion184Ny_dagensord'"
 ));


Edit
oh, I read list now.. so if more than 1 item.. you need a while sentence.

while $data = dbarray($result) {

// stuff

}
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Please read and comply with the Code of Conduct

(¯`·._.·(¯`°·._.·°º*[ Project Manager ]*º°·._.·°´¯)·._.·´¯)
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: helmuth, Falk