|
Posted by Rik on 06/19/07 23:39
On Wed, 20 Jun 2007 00:54:52 +0200, techjohnny@gmail.com =
<techjohnny@gmail.com> wrote:
> On Jun 19, 2:26 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
>> On Tue, 19 Jun 2007 23:22:29 +0200, techjoh...@gmail.com
>>
>>
>>
>> <techjoh...@gmail.com> wrote:
>> > On Jun 19, 1:38 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
>> >> On Tue, 19 Jun 2007 21:47:46 +0200, techjoh...@gmail.com
>>
>> >> <techjoh...@gmail.com> wrote:
>> >> > On Jun 19, 12:46 pm, "techjoh...@gmail.com" <techjoh...@gmail.co=
m>
>> >> > wrote:
>> >> >> On Jun 19, 11:39 am, Rik <luiheidsgoe...@hotmail.com> wrote:
>>
>> >> >> > On Tue, 19 Jun 2007 20:11:44 +0200, techjoh...@gmail.com
>>
>> >> >> > <techjoh...@gmail.com> wrote:
>> >> >> > > On Jun 19, 10:59 am, Rik <luiheidsgoe...@hotmail.com> wrote=
:
>> >> >> > >> On Tue, 19 Jun 2007 19:18:02 +0200, techjoh...@gmail.com
>>
>> >> >> > >> <techjoh...@gmail.com> wrote:
>> >> >> > >> > Ok,
>>
>> >> >> > >> > I posted earlier about this, a blank php page. I've enab=
led
>> >> >> logging
>> >> >> > >> > ALL in the php.ini, but nothing. If I change the name o=
f =
>> the
>> >> db
>> >> >> in
>> >> >> > >> > the include file, I get an error message, so I guess thi=
s
>> >> means
>> >> >> it's
>> >> >> > >> > connecting to the mysql db. I've included the first cou=
ple
>> >> >> lines of
>> >> >> > >> > code for this page:
>>
>> >> >> > >> First rule of hunting errors: do not surpress any errors b=
y =
>> @ if
>> >> >> > >> something
>> >> >> > >> isn't working.
>>
>> >> >> > >> Second: I do not see any output, so as far as I'm concerne=
d =
>> if
>> >> >> you've
>> >> >> > >> got
>> >> >> > >> no errors you would still see nothing.
>>
>> >> >> > >> - $qry['cat'] doesn't seem to be set anywhere, how come?
>> >> >> > >> - check your queries for errors: echo mysql_error(), and t=
he
>> >> query
>> >> >> > >> itself.
>>
>> >> >> > > The entire page:
>>
>> >> >> > Well, that's nice, I do not spot any clear syntax errors.(Tha=
t =
>> is,
>> >> if
>> >> >> I
>> >> >> > assume correctly that '// Check if scoreboard contains entrie=
s =
>> in
>> >> this
>> >> >> > category and, if so,list results' is on 1 single line) Howeve=
r,
>> >> with
>> >> >> no
>> >> >> > query result the only output would be '</ol><br />', which
>> >> obviously
>> >> >> > doesn't show up in a browser.
>>
>> >> >> > Wether there's a parse error in your other includes I couldn'=
t =
>> say.
>>
>> >> >> > So, check your queries, echo mysql_error(), check =
>> mysql_num_rows()
>> >> and
>> >> >> > echo it to check wether the result has data or is empty, etc.=
>>
>> >> >> > --
>> >> >> > Rik Wasmus
>>
>> >> >> Thanks.
>> >> >> echo mysql_error();
>>
>> >> >> Warning: session_start(): Cannot send session cache limiter - =
>> headers
>> >> >> already sent (output started at
>> >> /www13/htdocs/quiz/inc/header.inc.php:
>> >> >> 3) in /www13/htdocs/quiz/index.php on line 4
>>
>> >> > OK. I removed the header file and now it doesn't report anythin=
g.
>>
>> >> And how many rows in the dataset? Keep in mind I normally say =
>> different
>> >> things in a post, not just one.
>>
>> > Here is the mysql query:
>>
>> > DROP TABLE IF EXISTS questions;
>> > CREATE TABLE questions (
>> > ID int(4) unsigned zerofill NOT NULL auto_increment,
>> > question text NOT NULL,
>> > test varchar(31) NOT NULL default '',
>> > ans1 text NOT NULL,
>> > ans2 text NOT NULL,
>> > ans3 text NOT NULL,
>> > ans4 text NOT NULL,
>> > ans5 text,
>> > ans6 text,
>> > corans varchar(8) NOT NULL default '',
>> > expl text NOT NULL,
>> > PRIMARY KEY (ID)
>> > ) TYPE=3DMyISAM;
>>
>> > DROP TABLE IF EXISTS subjects;
>> > CREATE TABLE subjects (
>> > ID int(4) unsigned zerofill NOT NULL auto_increment,
>> > cat varchar(31) NOT NULL default '',
>> > descr text NOT NULL,
>> > random int(1) default NULL,
>> > PRIMARY KEY (ID)
>> > ) TYPE=3DMyISAM;
>>
>> I can clearly see that's not the query you are performing. Round 2, t=
ry
>> again. Still keep in mind the earlier remark that if the query has ze=
ro
>> rows it will not show you anything in a browser (unless you look at t=
he
>> source).
>
> mysql> show tables;
> 2 rows in set (0.01 sec)
>
> mysql> select * from questions;
> Empty set (0.00 sec)
>
> mysql> select * from subjects;
> 1 row in set (0.00 sec)
>
> Just a little more information.
Little droplets keep pouring in, I've got a feeling we're almost =
there...:-). This offcourse is still not what I was asking, but it'll do=
: =
no data in the resultsets, so no output, ergo no information screen. =
Please fill you database, with junk if need be, but no data in it equals=
=
no output from it I'd think.
-- =
Rik Wasmus
[Back to original message]
|