I'm quiet new to the PHP language, tho I have mostly programmed in C# in .NET platforms. Now I want to get some experience with the opensource part of the web development.
I know the basic coding for PHP (the syntax), but I'm not sure about which app is the best to make dynamic PHP programming in (like MS Visual Studio for C#), which patterns is a most, which do I have to code by hand, and which can be autogenerated by the developer app?
Cheers, will look at the possibilities.
So, when you have to program a PHP web app by your own, do you hand code all patterns needed to control objects between each others? Like controlling FKs between relations.
yes I hand code it, including table/data relations. But I have what I guess would be a custom pattern I have developed over the years and find it able to adjust and handle any web/app I can toss at it while still being readable and flexible.
I don't know, however I think it can't be done because the results would be undefined.
Assume the MODELS table holds the following data:
If you do "SELECT DISTINCT field1 FROM MODELS" you would get 1, 5, and 7.
Now there are three rows with field1=1, which field2 value should contribute to the result?
Assuming "SELECT field2, DISTINCT(field1) FROM MODELS" would be accepted, the field2 values would be unpredictable, i.e. the query is ambiguous.
Things would make more sense if you would need, and were allowed to do, the following: "SELECT MAX(field2), DISTINCT(field1) FROM MODELS"
PS: this isn't a PHP question, it is a database related question, the MySQL forum would have been a better choice.
A sub-select with a GROUP_CONCAT should do it....although I have not test this query.
select GROUP_CONCAT((select DISTINCT model FROM models where shw=1 ORDER BY modelid)) as mod_name, * FROM models where shw=1 ORDER BY modelid
this would return the subselect as a comma seperated value on each row by a column named "mod_name".
I would advise that you do not use the "*" in the other query as this forces mysql to do a secondary query to find and return the column names for the table models, it is better to just set them in the query to improve performance.
This index.php is not outputting anything to the browser but I can copy this file to another computer and it works as expected. Also, on the problem machine phpinfo() works fine and displays everything you'd expect.
I'm running Ubuntu 11.04 32-bit, Apache 2.2.17, and PHP 5.3.5-1. I'm guessing there must be something wrong with the php configuration but I haven't a clue as to what that might be. I've also tried print() as well and get the same results.
Hi, I am new to PHP. I am currently working on CRM project, I need to keep track of email status and update into my database such as who read the email or who opened?, who deleted?, who replied? and also When was the email opened/deleted/replied? Date and time. is there any possible to track if someone has read the email or hasn't which I have sent the email to them?
And you are what, writing the mail client then. No mail client will ever sent you a notification upon deletion, reading or reply.
You could try a redirect under each and every link in the e-mail, or possibly the images used in the e-mail. And you could track the hits this redirect page gets. This would give you a somewhat decent overview of how many people open / read. But again delete is a lot harder if not impossible to track.
thanks for your reply, I used images with my message content, I got read status. but I need delete status. First of all I want to know is it possible to track for delete? if yes is there a way to find out if someone delete the email which i have been sent?
If my memory serves IMAP has some features for this but your code has to manage this. If the user can connect to the email via an outside email program, outlook for example, then I do not think you can do anything about it.
You may look at your email server, the actual software that manages the email, and see if it has any kind of user logging features.
If your PHP files are related to web sites, you can use a web server that supports PHP. Xampp[^] would be one example; it will interpret the required PHP files on the spot; it can also be used to just compile-and-run a PHP file, as PHP is a general programming language, not necessarily linked to web stuff. You'd have to look the details up in the manual of your PHP system.