Page 1 of 2

Search form stopped working

Posted: Thu Feb 18, 2021 3:37 pm
by icoso
All of a sudden, my form is no longer searching or finding anything in the database from the browse screen. I did not make any changes to the form programming javascript. The only things I did was try to setup a USer who can access the form.

From the User Home Menu, I moved the form the Main Tab from the Fast Forms tab. Then I went into Access levels, went to the forms tab and added the form to that tab. After I added that form I checked all the boxes, and saved it. On the User tab it had nulaunchable in the Home field, Code: 100 Description: Browse Forms. I then saved it. It never showed up on the Users Page when I logged in as that user. Then when I wen t back to log in as my admin, it wasn't working. I tested another form that I had been using but it accesses a different table and it works fine. The form is a Browse and Edit form.

Any ideas what could have happened? I have no idea what to look for at this point. This is in my debug screen:
[0] :
===USER==========

globeadmin

===PDO MESSAGE===

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Customer_id' in 'where clause'

===SQL===========

Select * FROM `TaxCustomers` WHERE `Customer_id` = ?

===BACK TRACE====

/home/ktax/public_html/dbportal/core/nuform.php - line 129 (nuRunQuery)

/home/ktax/public_html/dbportal/core/nuapi.php - line 56 (nuGetFormObject)
There is no "Customer_id" in this table. the primary key is TaxCustomers_id. Where is the SQL select statement coming from? Where is it saved? Where is it getting Customer_Id?

Re: Search form stopped working

Posted: Thu Feb 18, 2021 3:41 pm
by kev1n
Does the query execute in phpMyAdmin?

E.g. run

Code: Select all

Select * FROM `TaxCustomers` WHERE `Customer_id` = 123

Re: Search form stopped working

Posted: Thu Feb 18, 2021 3:44 pm
by icoso
Sorry kev1n, I was editing my post while you responded. See additional notes at the bottom of my post.

Re: Search form stopped working

Posted: Thu Feb 18, 2021 3:50 pm
by kev1n
Press CTRL+SHIFT+F while the form is open an select the tab "Browse" to view the SQL.

Re: Search form stopped working

Posted: Thu Feb 18, 2021 3:54 pm
by icoso
This is in the SQL box:

SELECT * FROM TaxCustomers WHERE LENGTH('#SEARCH_FIELD#' ) > 2 AND
LEFT('#SEARCH_FIELD#', 1) <> '#'

This hasn't changed.

Re: Search form stopped working

Posted: Thu Feb 18, 2021 3:58 pm
by kev1n
Also check the Tab "Main" if the correct Primary Key is entered.

Re: Search form stopped working

Posted: Thu Feb 18, 2021 4:01 pm
by icoso
This is whats on the Main: TaxCustomers_id Which is the right field. The debug info apears to be old info. its from 1500 seconds ago. SO that must not be correct. There is no more recent debug info. Id eleted all the JAvascript code & BS code. still nothing. Its like it just died after I edited the User and Access LEvels.

Re: Search form stopped working

Posted: Thu Feb 18, 2021 4:06 pm
by kev1n
Does the search work with the globeadmin account?

(On the form where you have this SQL:
SELECT * FROM TaxCustomers WHERE LENGTH('#SEARCH_FIELD#' ) > 2 AND
LEFT('#SEARCH_FIELD#', 1) <> '#')

Re: Search form stopped working

Posted: Thu Feb 18, 2021 4:07 pm
by icoso
NOW my form is GONE completely!

I went into the Access Levels screen under poroperties for the form and tried to remove the 100 - Browse Forms that was in there. When I tried to check the box to delete this row, IT came back said AT least one column must be checked. SO I checked all the boxes and clicked save. And my form disappeared.. How does a FORM completely disappear????

Re: Search form stopped working

Posted: Thu Feb 18, 2021 4:17 pm
by kev1n
Are you sure you didn't hit the Delete button? Saving shouldn't delete forms (at least I have never experienced that).
If you look under "Forms", can it still be found or is it gone?