PHPMaker 9 Help with Server Events & Filter


 
Thread Tools Search this Thread
Top Forums Web Development PHPMaker 9 Help with Server Events & Filter
# 1  
Old 05-17-2012
PHPMaker 9 Help with Server Events & Filter

Hello,

I need some help with PHPMaker 9 "Server Events".

trying to do a simple filter but my lack of knowledge of PHP & Mysql is getting me in a jam.

I have 2 tables:

MyMainTable = which has all individual records for different people

and

Users = the security table that also has a "Cities" field with single quote-comma delimited city names.

What I need to do is to filter the MyMainTable to only display authorized cities records from the "Users" table.

The server event I have going on right now is:



Code:
// Recordset Selecting event
function Recordset_Selecting(&$filter) {
ew_AddFilter($filter, "`MyMainTable`.`City` IN (" . CurrentUserInfo("Cities") . ")");
}

The killer of the whole thing is that I had this running the other night and thought I backed up what I did to "Code Repository" but goofed. I know the server event above has an error. I may have added "Users" before or in CurrentUserInfo("Cities") . ")"); somewhere but I forget exactly what I did.

Errors I am getting are:


Code:
Failed  to execute SQL: SELECT * FROM `MyMainTable` WHERE  `MyMainTable`.`City` IN () LIMIT 20 OFFSET 0. Error: You have an  error in your SQL syntax; check the manual that corresponds to your  MySQL server version for the right syntax to use near ') LIMIT 20 OFFSET  0' at line 1
                              No records found                           
     
    
(mysqlt): SET NAMES 'utf8'
 Error (0): 


(mysqlt): SELECT COUNT(*) FROM `MyMainTable` WHERE `MyMainTable`.`City` IN ()
 Error (1064): You have an error in your SQL syntax; check the manual  that corresponds to your MySQL server version for the right syntax to  use near ')' at line 1


(mysqlt): SELECT * FROM `MyMainTable` WHERE `MyMainTable`.`City` IN ()
 Error (1064): You have an error in your SQL syntax; check the manual  that corresponds to your MySQL server version for the right syntax to  use near ')' at line 1


(mysqlt): SELECT * FROM `MyMainTable` WHERE `MyMainTable`.`City` IN () LIMIT 20 OFFSET 0
 Error (1064): You have an error in your SQL syntax; check the manual  that corresponds to your MySQL server version for the right syntax to  use near ') LIMIT 20 OFFSET 0' at line 1

Thanks in advance for any replies!


Art
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

CSV File:Filter duplicate records from column1 & another column having unique record

Hi Experts, I have csv file with 30, 40 columns Pasting just 2 column for problem description. Need to print error if below combination is not present in file check for column-1 (DocumentNumber) and filter columns where value in DocumentNumber field is same. For all such rows, the field... (7 Replies)
Discussion started by: as7951
7 Replies

2. Ubuntu

Load Balancing - LB Server & BackEnd1 & BackEnd2

Hello, What I wish to succeed is to setup loadbalancing between two dedicated servers. Here is my case: ======================================================================================================= LB IP (Just an IP address): Provided by hosting company (11.22.33.44) Hosting company... (1 Reply)
Discussion started by: baris35
1 Replies

3. Shell Programming and Scripting

How-To Check & Filter user input

Hi, On my Java webpage which invokes the shell script has two checkboxes viz ... apache and weblogic apache require one parameter i.e apache home from the user while Weblogic requires three or five params from the user vi.z weblogic_home or <jdk_home, config_home & pid>, username and... (4 Replies)
Discussion started by: mohtashims
4 Replies

4. Shell Programming and Scripting

Date capture & filter

Dear All, I am capturing system date and creating the file by using that time stamp, file is getting appended with checks of application & database check logs. But when the date is in between 1 to 9 both inclusive, it appends a single space to file name but after 9th it works fine. ... (5 Replies)
Discussion started by: pradeep84in
5 Replies

5. Shell Programming and Scripting

awk Help: Filter Multiple Entry & print in one line.

AWK Gurus, data: srvhcm01 AZSCI srvhcm01 AZSDB srvhcm01 BZSDB srvhcm01 E2QDI31 srvhcm01 YPDCI srvhcm01 YPDDB srvhcm01 UV2FSCR srvhcm01 UV2FSBI srvhcm01 UV2FSXI srvhcm01 UV2FSUC srvhcm01 UV2FSEP srvhcm01 UV2FSRE srvhcm01 NASCI srvhcm01 NASDB srvhcm01 UV2FSSL srvhcm01 UV2FSDI (7 Replies)
Discussion started by: rveri
7 Replies

6. Linux

awk filter & Auto gen Mail

hi experts 2012-01-30 10:30:01:812 "y" "NA" "30/01/2012 10:30:01:154 AM" 2012-01-30 10:33:46:342 "y" "NA" "30/01/2012 10:33:45:752 AM" 2012-01-30 10:41:11:148 "n" "200" "30/01/2012 10:41:10:558 AM" 2012-01-30 10:44:48:049 "y" "NA" ... (7 Replies)
Discussion started by: nith_anandan
7 Replies

7. Shell Programming and Scripting

filter input & outputs to another file

Hello All, I am stuck with the follwing problem , pls give me some advice.. Input file: input clock; input reset; \\reset all input yuv; //input comment output sur; output sud; output vtua; output tur; input ebi; //output comment The input file... (1 Reply)
Discussion started by: user_prady
1 Replies

8. Shell Programming and Scripting

A q for the gurus. Filehandling & reacting to events (?)

Ok, since i am scripting first-timer i want to apology in advance if any of my ideas are way off. What i am trying to achieve is a script that can listen for alerts from snort. When snort triggers an alert then i want my script to do nothing for X seconds, and after that period of time i want... (3 Replies)
Discussion started by: Fred
3 Replies
Login or Register to Ask a Question