
Mark Johnson
Members-
Posts
33 -
Joined
-
Last visited
Everything posted by Mark Johnson
-
filemaker db api for php connection
Mark Johnson replied to Mark Johnson's topic in Custom Web Publishing
Well as for moving all the files into separate tables or one solution that would be next to impossible. Not Impossible but next to. It would be extremely time consuming. Its been added to by so many people that its just gotten out of hand but to go and do all that into one solution and all wouldnt be very good. Its all to intertwined together plus we have c# apps that connect to the different solutions that would have to be re programmed to accommodate it. The only reason i was gonna put them into a function is to not use something that can be put into a function if that code is being used all the time but considering its only used once i guess, it doesnt matter. The whole APi for PHP thing is new to me as well as php also so im learning as i go hands on. I dont mind using the filemaker native security login stuff and i can get it all set up that way no problem but it will be time consuming but we may potentially have like 10000-20000 users as right now we have 14000 clients but not all of them have website access but going php we will be working on moving alot of them toward using our website. We dont do it much now cause we are using iwp and to us it just sucks all around. The other thing i can do is use one file that has external connections to other files and just have layouts for the different solutions in one file referencing that file. So basically like a data separation model would be, you have an interface file that everyone uses but it references the data file. A file thats like a portal to other solutions if thats able to be done. So they login and check the login with that one file and then i can query tables form other solutions in that one file just going to the layout assigned to it. -
filemaker db api for php connection
Mark Johnson replied to Mark Johnson's topic in Custom Web Publishing
Well the reasoning with the table of logins is its not for internal use its for a client website for our clients to login and we arent talking just a few, were talking about a few 1000 or more. Now granite we only have about 5 or so logging in at any given moment.  Right now we have a .fmp12 file that is slated for IWP in filemaker 12 that is in general just a portal meaning it only has 1 table but references all our other filemaker files via relationships. the reason why its multiple files is this is a database that has been built and added on since filemaker 5 and im the one dealing with it now. I would like to have a data seperation model where we have a data file and interface file but that would be an EXTREMELY long project and almost impossible for us to do in a good time frame plus to make sure the data is correct.  Theres alot of stuff that was done really funky and not by far the best way but to go and change that to a more effective way or less calculations or less scripts and all that would be hard.  ***********************************  - Now for logins issue......  Right now we have a client record with a corporate login (all records assigned to that corporation), regional login (only records assigned to that region) and client login (the individual location only meaning that 1 location). Now we do have a table for contacts where we can assign multiple contact people tot hat one location but if that one person is part of other client records then you have to add them to those client records as well. What i would like to do is be able to assign that one person to multiple client records across the board but thats a different story i guess possibly.  As for the function, how would i put that into a class or just a function to pass different logins if needed and return what is needed to say it was good or what would i return in the function for that? And how would i use it on the php code if i wanted to pull a list of client records once the function passed and it connected? Im trying to learn functions and some of it i can udnerstand but not when it comes to classes or writing functions for filemaker API for php. that im still learning but i need to learn it. -
Im looking at creating a connection class for connecting to the different databases that ill be needing to connect to to query for data and not familiar with classes much but found this one im trying to figure out. How do i get it to work properly and return to me what i need and also that it did connect successfully? as well as being able to use it for other filemaker databases i need to connect to? The connection details below is example but ill connect to logins.fmp12 first to check the users credentials with a table that has their login and password info then if success and they are active then ill go to a layout where they can do finds and pull data for customers etc which will not be the logins.fmp12 database it will be something like ohc_data.fmp12? <?php require_once 'FileMaker.php'; class FilemakerDB { // database connection details public static $host = '192.168.1.10'; public static $database = 'logins'; public static $username = 'user'; public static $password = 'pass'; private static $connection = null; // Private constructor for singleton pattern private function __construct() { } /** Values required for setting up the connection. **/ public static function setup($host, $database, $username, $password) { self::$host = $host; self::$database = $database; self::$username = $username; self::$password = $password; } // filemaker database connection public static function getConnection() { if (!self::$connection) { self::$connection = new FileMaker(); self::$connection->setProperty('database', self::$database); self::$connection->setProperty('hostspec', self::$host); self::$connection->setProperty('username', self::$username); self::$connection->setProperty('password', self::$password); } return self::$connection; } // clone private for singleton pattern private function __clone(){ } } $db = new FilemakerDB(); if (FileMaker::isError($db){ echo "Error"; }else{ echo "Good Job"; } ?>
-
I have a Searchloads.php file that is showing a lsit of my records im pulling from filemaker. right now its hardcoded to sort records based on two fields. How do i allow the user to sort records based on what they choose in a drop down menu? Or maybe two sort drop down menus? and if the second isnt set then it just works off the first one.
-
below is some code that i loop through records creating an unordered list. basically a table just in list form. What i want to do is in the url i have a variable being passes called page= and whatever page number i get at that time. I have a css style that when im on a specific page the pagination link that corresponds to that page should be green so i know by looking at pagination links what page im on instead of looking at the url for page number. how do i do that? $n = 1; while ($n <= $totalLinks and $totalLinks > 1) if ($page == $n) { echo '<li><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $n . '&skip=' . $skip . '&max=' . $max . '">' . $n . '</a> </li>'; $n++; } else { $skip = ($n - 1) * $max; echo '<li><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $n . '&skip=' . $skip . '&max=' . $max . '">' . $n . '</a> </li>'; $n++; } The li tag thats active would be <li class="active">. Each time i click a page number on pagination links it should highlight for that page number. figured it out my self. Sorry.. played with it and realized it was like supper simple what i did. Im learning php along with php for api for filemaker so im not familiar with it all.
-
One more question, how to i write that fmpTrapError2 function to not only go to an error page but also give me a url in a variable that i can echo out to that go back to previous page button so they can click the button and go back if i wanted them to? obviously i have the navigation so they can click whatever but id like to have it just in case.
- 5 replies
-
- redirect
- filemaker error
-
(and 1 more)
Tagged with:
-
ok i got it to redirect finally. it was an error on my error.php page with session start etc on top with a redirect back to login which was working correctly. My only issues now is, and i've uploaded the updated pages, is on line 24 or so, theres an fmpTrapError2 function that im passing my own message into along with the error code that doesnt seem to work properly on the error page. Not sure if im doing it right or not in the function. Functions.php error.php login.php
- 5 replies
-
- redirect
- filemaker error
-
(and 1 more)
Tagged with:
-
still having issues. I rearranged the getrecords() function to go below the Filemaker::iserror($result) and it doesnt give me the above error but the fmpTraperror or fmptraperror2 not the standard header redirect doesnt go to the error page like its suppose to. fmpTrapError is the standard error function that gives me filemaker's errors but i modified it with fmpTrapError2 to pass my own errors if i want to so if someone can look at that and make sure im doing it right that would be great. error.php login.php Functions.php defines.php
- 5 replies
-
- redirect
- filemaker error
-
(and 1 more)
Tagged with:
-
the error i get is Fatal error: Call to undefined method FileMaker_Error::getRecords() in /home/mjohnson/public_html/ergo/login.php on line 101. Yea i have it commented out for now but if i re-enable fmpTrapError($result, "error.php"); function then i get the above if it try to login with the wrong credentials but if i login with correct credentials then it redirects to LoginSuccessfull.php like its suppose to.
- 5 replies
-
- redirect
- filemaker error
-
(and 1 more)
Tagged with:
-
Ive attached my code pages. The issue i have is if the login credentials is correct it redirects great but of not then it doesn't work and displays an error of below. Whats goin wrong? I used some of the functions from a plugin that i own to play with and they work just not if its wrong login. login.zip
- 5 replies
-
- redirect
- filemaker error
-
(and 1 more)
Tagged with:
-
Ive got a similar issue but ive got a PC running FM server 12 adv on my network and ive got FM go 12 on my ipad connected to the same network via wireless. I add my PC to the list on FM go 12 with its ip address but i can see any of the files on it. All my files i can see if i use open remote on FM Client 12 on any computer on the network running FM client 12 but my ipad wont see them. Even if i try to manually type the name in the field it says host either unavailable or file not found error. windows firewall says its disabled and my antivirus is disabled as well. What can be the issue? I have a client i need to set up this way but i gotta figure it out why it aint working on my system first. Mark
-
I downloaded a file that uses the reactor plugin. I was looking at the functions of it and was trying to use the slider function for sliding from one record to another via the slider bar. I have the plugin inside of a webviewer and can use the slider and slide from left to right and vice versa but how do you get it to slide from one record to another either on found set or show all records? Also is there anymore detailed documentation that actually shows you how to use the plugins and how to set them up otehr than what little info i found on their website? Mark
-
- fusion reactor
- filemaker plugins
-
(and 1 more)
Tagged with:
-
I have a database that has a table with a list of techs and the contact info for them but also have a seperate table that has a list of all my clients. what i want to do is on the main page of the database that gives me an overview of the client, i have a portal that lists all the techs that are associated with the state that my client is in but i want to be able to have a field calculation that i can do that will show the distance between the location of the tech and the location of the client based on the city and state between each so that i can scroll throught the list and find the techs that are closest to the client and then view the info for the tech and call them instead of having to go to google all the time and type in all the info. One thing though, i dont want the google webpage to be viewed in filemaker, i just want a number in the field and thats it. Is there a way to do it.
-
But how do i sum up the monthly premium amount on a weekly basses so i can see how much i am pulling in so far? I need to sum up the monthly premium amount for all records created each week in a weekly column but also sum up the same monthly premium field on a monthly bases. I need to break it down per day, week, month and year. Ive attached a jpg of the layout. the text in red is my notes. I hope this helps some. The monthly summary on the layout now is already done but i tried to figure out what was done and can't. I guess in a nutshell, How do you do a summary for a price field based on a calc field with WeekOfYear that basically gets what week it is for the current week?
-
No i dont have any idea about summary fields.I can make a calculated field with WeekOfYear ( date ) in it. But if i find all my new accounts for the week and say there is 4 new accounts for the week, each account for the week is paying $39.95 monthly premium. I need to sum up all 4 records for the monthly premium field in one field so i can see how i am doing for the week. As well as monthly and yearly to date as it progresses day by day. for example the above 4 records would have a weekly sum of 159.80 for the week as of today plus the ones i create tomorrow as well when it comes.
-
Please.... Can anyone help? I'm getting a little frustrated right now. All i need to do is figure out how i can summarize a field i have that has the monthly premium the client pays. Basically its like doing a found set of records for all new clients for the week and summarizing the total premium of all clients entered for that week.
-
I need to have a field that pulls a weekly sales total for a salesman. I have a field that has a total billed amount for each customer but need the total amount for the week for any given salesman that i do a find for. Whats the easiest way to do so? and also the same concept for the year.
-
I am wanting to know if theres a way to do this. I'm new to filemaker and still learning a lot. I have a database that has over 8000 customers. Say if one day i do a found set of records for whatever reason. A customer calls in and i need to access the same database to check out the record for that customer but if i try to find that record, i just lost all the work i did for that found set. So now once im finished with that customer, i have to go through all that work i just did to pull all the records in a found set again that i did earlier which creates double the work. Is there a script i can write that will save the found set for later and all i need to do is run it and it will check and pull the found set i ran last or give me an option to maybe save them as a different name for different types of found sets that may be complicated and time consuming?
-
I have an xml file and a style sheet i downlaoded from a web site that uses xml and xsl but when i import it into filemaker, it gives me errors and won't do it. attached are the files im trying to import. character-sheet.zip
-
Filemaker on PC and quicktime
Mark Johnson replied to Mark Johnson's topic in Calculation Engine (Define Fields)
yes its 9.0v3 -
has anyone come up with a fix as to why filemaker crashes when you have a container field set as Insert quicktime and insert a mp3 file into it and all the sudden it crashes on pc only. Everytime i insert quicktime and import the mp3 file into that container field, filemaker crashes and i have quicktime 7.5 on it.
-
The double @@ symbol's worked great. Thats exactly what i was looking for. Something that can number the rows and be printed and not have to worry about physically trying to change the numbers or anything. thanks for all your help everyone.
-
Well the portal row is for a song playlist and i have the portal rows with a button to move the song up or down in the portal rows for the song i want to play first or if i want to arrange the songs in a different play order but i want the numbers so when i print the list i have the songs numbered on the print out for one but also just to keep track so i can just look at the row and say i have 4 songs and not have to go through the long list and count them physically.
-
I have a portal that pulls records correctly from another table with a field in that portal that has a calculation for Get (PortalRowNumber. So its basically like this: FieldName = Get (PortalRowNumber. My FieldName is just a calculation with the get function in it is all. The issue is when i go into browse mode, all it shows in that field for every record that is listed in that portal is 0 for the portal row number even if i have 7 records in that portal. They still all show 0 for the portal row number. Can anyone tell me what could be the problem? The relationship is correct and everything else works but the portal row number.