Re: mailing

From: Richard Rothwell (R.Rothwell@latrobe.edu.au)
Date: Sun Oct 10 1999 - 18:09:06 EST


I have a complex query that looks like this:

                     SELECT p.done, i.first_name, i.last_name FROM
student_progress=p, user_identities=i
                     WHERE p.task_ID=1 and p.user_ID='0123458' and
i.password='C123458' and i.user_ID =
                     p.user_ID

It is not returning records that are there. In fact this was working in the
past but used in another project. When it initially stopped working I
rearranged the order of some of the items and it started working, but when I
fed it different items to search on it failed again. For example
p.user_ID='000000' and i.password='Netist0' works.

This is using miniSQL version 2.0.10 on RedHat 5.2. Currently the code is in
a library.

Anyone any ideas????

The database structure is generated using:

echo("Creating the student progress table ... ");
if (msqlQuery($sock, "CREATE TABLE student_progress
   (
       user_ID char(7) not null,
    task_ID int not null,
       done char(3) not null,
       date_complete date not null,
       time_complete time not null,
       mark real not null
   )") < 0)
 {
 fatal("Error : $ERRMSG\n");
 }
echo("done.\n");

and

echo("Creating the student identities table ... ");
if (msqlQuery($sock, "CREATE TABLE user_identities
   (
       modifier_ID char(7) not null,
       user_ID char(7) not null,
       password char(7) not null,
       first_name char(30) not null,
       last_name char(30) not null,
       nickname char(30) ,
       email_address text(30),
       student_staff char(7) not null,
     active char(3) not null
    )") < 0)
 {
 fatal("Error : $ERRMSG\n");
 }
echo("done.\n");

-------------------------------------------------------------------------
To unsubscribe, go to http://www.Hughes.com.au/extras/email/



This archive was generated by hypermail 2b30 : Mon Mar 04 2002 - 09:03:51 EST