View Full Version : Technical questions from a newbie
Arsby
05-02-2012, 08:40 AM
I've been playing around with my web site and database.
1) I defined the phone number as an integer in PHPMagic, which is too small. What's the best way to define a phone number in PHPMagic? (I fixed it to "bigint" in the MySQL database and the website maintains it correctly now.)
2) Is there a way to make the phone number look like a phone number with dashes (215-555-1212)?
3) I mistakenly defined an email address field as an integer. I fixed it in the MySQL database but the website can't maintain it. Is there a way to change the web site field without re-uploading the whole website?
Thanks.
Roy
Kayla
05-02-2012, 06:27 PM
1) VarChar
2) Maybe - I thought perhaps a concatenation (http://www.websitedatabases.com/database-forum/showpost.php?p=107&postcount=1) would work in the generated table_view.php file but I'm not sure about the second hyphen.
3) Fix it in PHPMagic and re-generate the files. Upload only the new .php files. Re-run setup.php it should update the MySQL database for this field. OR - If you host offers phpmyadmin to manage your databases you could change two field datatypes yourself and that would fix your issues.
Arsby
05-02-2012, 08:55 PM
Thanks!
I had a meeting with my client, who liked the general idea, but had some criticisms about the layout and some requested functionality that didn't work.
Here are some issues that came up:
1) For some reason two web link fields came out looking like web icons in table view, but I can't input into them in detail view. I defined them as Char/255. In PHPMagic in the File/Image upload tab in Table View I checked to display as Icon, and in Detail View to display as a link. Then in the Link Behavior tab on the right I marked Web Link and on the left I marked Clickable Icon. I do not want to upload documents. I'd like to paste in a link in detail view, see it as a web icon in table view (only if the link field is non-null), and click on the icon to go to the linked site in table view. How do I do that? I'm wondering if I should not have checked anything in the File/Image Upload tab.
2) Is there an easier way to filter, or perhaps a way to save a filter and invoke it? Our main table ("Certifications") has many records per building, and many of our users will want to see all of the records for their particular building, not all of the others. The client wanted to know if there was a way we could start in the Building file (a parent file to Certifications), click a building and see all of the records just for that building. It sounds like that's a little out of the scope of PHPMagic, but maybe you could suggest an easier way for them to get to the records for just their building.
3) The table layout of the main Certifications table is very wide, because there are lots of fields. However that means that we have to right-scroll to the "Next" button each time we want to scroll down. I'm thinking I can probably fix that by editing the page and moving the "Next" button to the left next to the "Previous" button. Is there any way to do that with styles so that I don't have to re-fix it whenever I add a field and have to change the layout?
(The client was looking all over for a scroll bar on the table view. I guess there's no way to do that, right?)
By the way, the generated website looks great on an iPad. :)
Roy
popye
05-03-2012, 05:09 PM
2) http://websitedatabases.com/filters.html
3) Well regarding the VarChar/255 is way to long for a field length for a filename. Unless your filenames are 255 characters long. Perhaps a lenght of 30 or 40 would do and a cloumn width of 50.
vBulletin® v3.7.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.