Database Forum
Web Database Register Members List Calendar FAQ

 
Go Back   Database Forum > Other Database Software > MySQL Database Reports Generator
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Default Can't get SQL Query option to work
07-04-2007, 11:05 AM #1  

Mazal
Junior Member

 
Status: Offline
Posts: 3
Join Date: Jul 2007

Hi all ,

I can't get the SQL Query option to work when generating reports. I enter my query and click on execute and the system reports "Valid SQL Query". I then go through the steps but the resulting report are just a blank white screen. Not even the style I choose is there.

When using the "table" option it works 100% with no problems.

Is there anything specific I must do to get the SQL Query option to work cos I really need it ?

PS. I even used a simple query like : select * from tblname where columnname = 'criteria'; and still it doesnt work

Any help would be greatly appreciated.

Last edited by Mazal; 07-04-2007 at 11:12 AM..
Reply With Quote

Default
07-05-2007, 01:10 PM #2  

twenty1
Senior Member

 
Status: Offline
Posts: 221
Join Date: Mar 2005
Location: Iowa, USA

Hi,

What's the full query you wish to run?
select * from tblname where columnname = 'criteria';
It may be something to do with the 'criteria' that is done visually in one of the steps.
Reply With Quote

Default
07-05-2007, 01:40 PM #3  

Mazal
Junior Member

 
Status: Offline
Posts: 3
Join Date: Jul 2007

This is the actual query :

select * from musiekdvds where Disk_Name = 'Faith Hill DVD';

It works 100% when I run it on the MySql server itself and retrieves the data. But on the form generator , nothing.

I even tested on another table with :

select * from users where naam = 'Wikus';
Same thing , works 100% when I run it on the MySql server itself , but on the form generator just blank white screen.
Reply With Quote

Default
07-05-2007, 02:40 PM #4  

Sandman
Moderator

 
Status: Offline
Posts: 98
Join Date: Mar 2005

Maybe if you need another way try a little php script.

displayit.php
PHP Code:
<html>
<head><title>FEEDS</title></head>
<body>
<?php
$database
="database_name";
mysql_connect ("localhost", "username", "password");
@
mysql_select_db($database) or die( "Unable to select database");
$result = mysql_query( "select * from musiekdvds where Disk_Name = Faith Hill DVD" )
or die(
"SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
print
"There are $num_rows records.<P>";
print
"<table width=200 border=1>\n";
while (
$get_info = mysql_fetch_row($result)){
print
"<tr>\n";
foreach (
$get_info as $field)
print
"\t<td><font face=arial size=1/>$field</font></td>\n";
print
"</tr>\n";
}
print
"</table>\n";
?>
</body>
</html>
Of course edit your own db connection stuff. Never really used this app's sql window but i think your issue is because your report can be generated visually using the tables option. Just a guess...
Reply With Quote

Default
07-05-2007, 03:18 PM #5  

Mazal
Junior Member

 
Status: Offline
Posts: 3
Join Date: Jul 2007

So if I understand correctly , I should run a php file with that code seperately and not use the Report Generator at all ?
Reply With Quote

Default I'm having the same problem
08-05-2008, 08:04 PM #6  

emindspan
Junior Member

 
Status: Offline
Posts: 1
Join Date: Aug 2008

Is there anything wrong im doing in the sql statement.

Error:

Parse error: parse error, unexpected T_LNUMBER in /home/content/s/e/c/secured1admin/html/generator/reports/37914628/config.php on line 22

Script on line 22:

$sql='SELECT * FROM payments WHERE Company='37914628'';
Reply With Quote

Default
08-06-2008, 03:28 AM #7  

popye
Member

 
Status: Offline
Posts: 80
Join Date: Mar 2005

see syntax..

Company='37914628''
Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 06:38 PM.

Powered by: vBulletin Version 3.7.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Database Forums

Help support our forum assistants and product development ->

go to top go to top