Jump to content

ayok

Members
  • Posts

    340
  • Joined

  • Last visited

    Never

Everything posted by ayok

  1. Hi, Now I'm working with Joomla! site with virtuemart shop engine, and my problem is I sometimes find an annoying whitespaces. These whitespaces create an empty space that destruct the layout. I've manage to remove it with jquery trim. However, it must also be done with PHP because the script seems to consider this as not empty, so the modules, which suppose to be hidden if it's empty, is just displaying empty space. I've tried trim, but it's not working.. it's still showing empty string. Like the image bellow if I open the browser console (circled): If i copy the whitespace from the console and paste it to notepad, it shows me empty space and some question marks (?). Is there any advice how to get rid of this annoying problem? Thanks, ayok
  2. Ok thanks, I'll try this way..
  3. What kind of database? I use mysql and there are like hundred thousands items, is this going to be fine? Thanks
  4. Hi, I am busy creating a site which display product list from XML (rss feeds) files. In the first phase I can do a method by saving all the data's from XML into my database, and display it from database. However, this time, I need to display it directly without saving it to my database because there are a lot more data's in the second phase. So I need to display the data's directly from the XML's. I've tried several methods like using SimpleXML, it works nice, however, it can't handle larger XML (like 800 MB). So I tried other method like SAX or XMLReader. Both work like a charm. It can even parsing GB's XML and display all the data's. However, I need to create query or manipulate the xml to display those data's, like only display certain category or search. Then I got again the same problem with time limited error or sometimes size exceeded error. I don't know what to do now. Does anybody have advice how I should do this? Thank you, ayok
  5. Thanks.. I've tried using HAVING, and still got error. Can't I have HAVING and WHERE in a query? Yes I plan to display those randomly.
  6. Hi, I'm trying to select the difference between column 'original_price' and 'price' which is less than certain amount. Here is my query. SELECT *,(original_price - price) AS profit FROM items WHERE profit <= '50.00' ORDER BY RAND() It gives me a mysql error that profit is not exist. Would someone tell me how to get expected result? Thank you. ayok
  7. But the query is much faster after I change the left join query to normal where query... Maybe because there are many records in left table?
  8. Hi thanks, Does it mean that with left join it will return more results? Does "left" means table on the left, mentioned in the query, got the priority? But why is it slower with left join?
  9. Hi, I have this query $sql = "SELECT"; $sql .= " factuur.id, DATE_FORMAT(factuur.factuurdatum, '%d-%m-%Y') AS factuurdatum, factuur.prefix, factuur.volgnr,"; $sql .= " SUM(bestelling.bedrag) AS bedrag"; $sql .= " FROM {$db['factuur']} AS factuur"; $sql .= " LEFT JOIN {$db['bestelling']} AS bestelling ON bestelling.factuur_id=factuur.id"; $sql .= " WHERE factuur.uid=" . $uid; $sql .= " GROUP BY factuur.id"; $sql .= " ORDER BY factuur.factuurdatum DESC"; And it works sooo slow when I got hundreds of records in "bestelling" table. Then I change the query into this $sql = "SELECT"; $sql .= " factuur.id, DATE_FORMAT(factuur.factuurdatum, '%d-%m-%Y') AS factuurdatum, factuur.prefix, factuur.volgnr,"; $sql .= " SUM(bestelling.bedrag) AS bedrag"; $sql .= " FROM {$db['factuur']} AS factuur"; $sql .= ", {$db['bestelling']} AS bestelling WHERE bestelling.factuur_id=factuur.id"; $sql .= " AND factuur.uid=" . $uid; $sql .= " GROUP BY factuur.id"; $sql .= " ORDER BY factuur.factuurdatum DESC"; It goes a lot faster. But why? Should I stop using left join? What's the different between these queries? Will I get different result?? Thank you, ayok
  10. Ah, thanks! stupid me.. I should've thought about that.
  11. Hi, I am looking for a method how I can possibly make an airlines online ticket booking system, like for example this one http://www.cheaptickets.com/? I wonder how I can communicate with the ticket reservations system like worldspan or galileo, etc. Is there anyone who has this experience? I need an advice please.. thank you, ayok
  12. Hi, I don't have specific question, just wonder how to make this application. Go to this site http://www.krono-original.com/en-index.htm and click on "Floor Studio". You see in this page, it's kinda normal slideshow. But the nice thing is when you choose a floor you will see the image change, but only the floor! My first guess (not a smart guess i think) is that they have different kind of interior with different floor.. But that would be too many works. It has a lot of pictures for interiors and floors! The smartest guess I have is to manipulate the image of those floors into different position, maybe with javascript (but i don't know how), and cut the floor on all the interior images with photoshop. But that's also alot of works.. I'd like to ask the javascript/ajax guys here how you could possibly do this trick. Maybe anyone has experience to do this? Regards, ayok
  13. Goh! Thank you guru! I got headache from this..
  14. I've tried with foreach, but maybe I've used it wrong, so I always get the same result. no change. Could you show me the right way? thanks.
  15. One more question. I have this array: Array ( 0 => Array ( [width] => 500 ), 1 => Array ( [height] => 300 ), 2 => Array ( [depth] => 500) ) How can I make to: Array([width] => 500 [height] => 300) [depth] => 500) ? I can do of course with array_merge(array[0],array[1],array[2]) or array[0] + array[1] + array[2], but the amount of arrays would be different. I got error if there are only 2 arrays. What could be the trick? Any help would be appreciated. Ayok
  16. Oh..... yes of course.. Thanks...
  17. Hi, Here is simple question. I have this array: array([0]=>name [1]=>Tony); How can i change into array(name=>Tony); ? Thank you, ayok
  18. OMG! This is what I'm looking for!! Thanks a lot! AbraCadaver, you're the best.
  19. For example: class People{ var $them = array(); function groupPeople(){ foreach($this->them as $him){ echo $him.", "; } } } $people = new People; $people->them = array('Harry','Todd'); $people->them = array('Tom','Jerry'); $people->groupPeople(); // result: Tom, Jerry, I think this code is working. However, I need to merge those array above, array('Harry','Todd') and array('Tom','Jerry') So I can get array('Harry','Todd','Tom','Jerry') and a list of names as a result. Maybe I should use array_merge, but how? A little help would be appreciated. Thank you in advanced, ayok
  20. ayok

    PHP mail()

    Hmm.. that makes sense, but... it's sent to normal e-mail (err.. i mean like my e-mail). The only e-mail that is not able to receive the messages is their e-mail which has been made on gmail (alias).
  21. ayok

    PHP mail()

    Here is my code $query_adminsite = "SELECT * FROM owner"; $adminsite = mysql_query($query_adminsite) or die(mysql_error()); $data = mysql_fetch_array($adminsite); $Name = $data['name']; //senders name from database (owner) $email = $_POST['email']; //senders e-mail adress $recipient = $data['email']; //recipient e-mail from database (owner) $subject = "Sent from ".$Name; //subject $header = "From: ".$email . "\r\n"; //optional headerfields //mail body $content .= "Name: " . $_POST['name'] . "\n"; $content .= "Company: " . $_POST['company'] . "\n"; $content .= "Address: " . $_POST['address'] . " " .$_POST['number']."\n"; $content .= "Postcode/City: " . $_POST['pcode'] . " " .$_POST['city']."\n"; $content .= "Phone number: " . $_POST['phone'] . "\n"; $content .= "E-mail:" . $_POST['email'] . "\n"; $content .= "Comments: " . $_POST['remarks'] . "\n\n"; if(mail($recipient, $subject, $content, $header)) { echo '<p>Sent!</p>'; $show = false; } else { echo '<p>Not sent</p>'; $show = false; }
  22. ayok

    PHP mail()

    It's strange that i can just e-mail them. I saw in their DNS setting that the MX (10) is sent to ASPMX.L.GOOGLE.COM, MX(20) to ALT1.ASPMX.L.GOOGLE.COM, ALT2.ASPMX.L.GOOGLE.COM, ALT3.ASPMX.L.GOOGLE.COM. etc..
  23. ayok

    PHP mail()

    Is it possible to get a "non-delivered message" if it's not sent? to my email for example?
  24. ayok

    PHP mail()

    Hi, thanks thrope, I've just looked into the DNS settings, the email is redirected to ASPMX.L.GOOGLE.COM. I don't know if someone can help me here, but i will search about it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.