While Searching, all records are displayed

G

George

Guest
I have installed Dadabik and facing a strange problem. When searching for records, all the records in the table are displayed. At the same time,or some field search, like the unique field , it shows the correct record. Is this a problem in dadabik configuring or MySQL?. I tried using an older version of dadabik and still the problem remains. I am totally out of steam, and do not know how to correct the problem. Please help me
 
M

Mitch

Guest
Did you ever figure this out or get a response? I just installed dadabik and everything setup and looks great but whatever I do in the search form results in all records being returned. I turned on debugging and the SQL statement is always "select * from 'tablename' limit 0 , 10" no matter what I enter in the search. Can anyone help us?
 
J

John

Guest
FYI,
I am using V2.2.1 Beta and the search function is working well.
I was having lots of problems due to having a base table primary key that was comprised of multiple columns. When I dropped the table's compound primary key and created a unique PK comprised of a single column. All searches and updates worked after refreshing DaDabik.
Hope this helps
John
 
E

Eugenio

Guest
Mitch wrote:
>
> Did you ever figure this out or get a response? I just
> installed dadabik and everything setup and looks great but
> whatever I do in the search form results in all records being
> returned. I turned on debugging and the SQL statement is
> always "select * from 'tablename' limit 0 , 10" no matter
> what I enter in the search. Can anyone help us?

George, Mitch, send me an e-mail with the dump of your mysql database.

Eugenio.


(Latest version of DaDaBIK when this message was posted: 2.2.1)
 
M

Mitch

Guest
Thanks for the feedback John. It's probably something really simple but unless I'm missing something I don't think the PK is the problem. Here is the Table creation code for one of my tables:
CREATE TABLE LabMan (
record_id int(11) NOT NULL auto_increment,
ExtraField varchar(175) default NULL,
...
Other field definitions
...
date_time_posted varchar(100) default NULL,
PRIMARY KEY (record_id),
UNIQUE KEY record_id (record_id)
) TYPE=MyISAM;

dadabik v2.2.1
I'm running PHP Version 4.1.2
Apache/1.3.23
RedHat 8
I'm going to spend some time today trying to figure out if I'm just overlooking something that I should have picked up in the documentation. I have been able to install pre version 2 dadabik with success but I really like the new features in 2.2.1 and am stumped as to why the search is not working. Thanks.
 
M

Mitch

Guest
Well I still have not fixed it but have discovered a few other problems that I think are probably all related to same issue.
After configuring using internal_table_manager, I tried using the update and even when all required fields are filled in (I've set 4 as required) I get:

You haven't filled out some required fields.
Please go back and fill all the required fields.

Anyway I started looking at the code (I'm a PHP newb' so bare with me) and inserted a debug print statement in the search (see below "my debug code") and it looks like the $sql variable is not getting set but it looks to me like it should be??
### form.php code snippet ###
case "search":
// build the select query
if (!isset($sql)){ // otherwise we have the $sql from navigation buttons 1 2 3 etc
echo "<b>SQL not set</b>"; //my debug code
$select_without_limit = build_select_query($HTTP_POST_VARS, $conn, $db_name, $table_name, $table_internal_name, $records_per_page, $page);
} // end if
else{
$select_without_limit = "select * from ".$quote."$table_name".$quote."";
if ($sql != ""){
$select_without_limit .= $sql;
} // end if
} // end else
### end of form.php code snippet ###

I'm still at a loss but thought that this additional info might turn a light on for someone less clueless than I.
Thanks.
 
Top