Search found 9 matches

by rustem
Wed Jun 27, 2007 1:40 am
Forum: PHP - Code
Topic: Need help groupping complex array
Replies: 13
Views: 720

feyd | Please use , and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color] Well, I c...
by rustem
Tue Jun 26, 2007 9:29 am
Forum: PHP - Code
Topic: Need help groupping complex array
Replies: 13
Views: 720

Thanks for reply. Here is what I need to do: http://avia.lt.sezamas.serveriai.lt/ScreenShot008.gif . The code you wrote is close to that, but has exactly same problem: the result is wrong, because it would allow user to select combinations like 40/30 or 10/50, which are invalid - there is no element...
by rustem
Tue Jun 26, 2007 7:37 am
Forum: PHP - Code
Topic: Need help groupping complex array
Replies: 13
Views: 720

Ah, so you already get all possible combinations from that database and they only have to be arranged in a more convinient way. Is this Amadeus like an sql database? Can you specify a sort order or even two? Something like ORDER BY price,outbound ? Exactly! Actually, I get information from Amadeus ...
by rustem
Tue Jun 26, 2007 7:03 am
Forum: PHP - Code
Topic: Document Management in PHP - URGENT HELP NEEDED
Replies: 3
Views: 440

$dir = "documents/"; Have you tried without "/", just "documents" ? Also, before you make a directory, check whether it already exists: if(!is_dir($dir)){ mkdir($dir); } What touches saving filepaths into DB, why don't you want to save them during the upload? If for so...
by rustem
Tue Jun 26, 2007 6:21 am
Forum: PHP - Code
Topic: Need help groupping complex array
Replies: 13
Views: 720

A group should not contain any combination of the outbound and inbound ids that is not found in some offer. Please explain in more detail. Exactly what is an offer? What in/outbound ids belong to one offer? Sorry. I call "offer" a flight offer, returned from the database (actually, it com...
by rustem
Tue Jun 26, 2007 4:49 am
Forum: PHP - Code
Topic: Need help groupping complex array
Replies: 13
Views: 720

Re: Need help groupping complex array

volka wrote:
rustem wrote:A group should not contain any combination of the outbound and inbound ids that is not found in some offer.
How can you tell the offers apart?
I don't understand the question.
by rustem
Tue Jun 26, 2007 4:02 am
Forum: PHP - Code
Topic: Need help groupping complex array
Replies: 13
Views: 720

If it could be done using database, fine. I just don't know how and ask for your help.
by rustem
Tue Jun 26, 2007 3:36 am
Forum: PHP - Code
Topic: Auto switch resolution for mobile internet
Replies: 5
Views: 634

Your question is too general. Be more specific please. I will say this, however. I am guessiong you want to create different versions of your website for mobiles and PCS and need to be able to detect the resolution of the client that accesses it. PHP cannot do it because it's a preporcessor (it runs...
by rustem
Tue Jun 26, 2007 3:09 am
Forum: PHP - Code
Topic: Need help groupping complex array
Replies: 13
Views: 720

Need help groupping complex array

Hi, I am coding the airplane tickets reservation system. When I receive search results from the flights database, many of the flights have the same price, but timing and some other info is different. So, I need to group all the flgiht offers by price. Sounds easy, but there is one problem when we de...