Jump to content

MrXHellboy

Members
  • Posts

    153
  • Joined

  • Last visited

    Never

Everything posted by MrXHellboy

  1. Please remove this once, i wanna know what happens then..... $item1 = "<td width='160'><a href='UsedBikeDetails.php?BikeID=$BikeID'><img border='0' src='ProductImages/$Photo' width='150' height='200'></a></td>";
  2. How would you suggest something like that ?
  3. The post above here will describe my tables... This is the result now: Laurens Skills: Football Max Skills: Football Laurens Skills: Football Max Skills: Swimming Max Skills: Football Laurens Skills: Swimming Laurens Skills: Football Laurens Skills: Football Laurens Skills: Swimming As you can see (dont pay attention to the skills), just a test, it will result in name -> skill, done with the following code: $Query = "SELECT name, skill FROM members as a INNER JOIN skills as b ON a.id = b.member_id"; $result = mysql_query($Query) or die ('Something went wrong!'); while ($row = mysql_fetch_object($result)) { echo $row->name.' Skills: '. $row->skill.'<br />'; } I want to have: Laurens: -> All the skills Max: -> All the skills Not name and skill, time after time
  4. Unfortunately it didnt work out.. My member table has 3 fields -- id, name, nickname My Skills table has has 3 fields -- id, member_id , skill Maybe this is helpfull ?
  5. MrXHellboy

    Group By

    I have a simple query: SELECT name, skill FROM members as a LEFT JOIN skills as b ON a.id = b.member_id For instance, we have 1 name with 4 skills. Within a loop it will result in 4 times the name, followed with the skill. But i want to have 1 name with all of the skills. Not 4 times the name with each time a other skill. Group By name results in 1 single name with 1 single skill while he has 4 skills. Someone has a solution ?
  6. Ho to rewrite: http://domain.com/category/news/press-releases/ http://domain.com/press-releases/ Thos are categories from wordpress, not folders. Any idea how to rewrite url ?
  7. Just out of curiosity When changing the php.ini file "max_execution_time" to 5, it still looks like it takes 30 seconds. However, you will receive an fatal error which states max exec time of 5 seconds exceeded.... Anyone ? No safe mode, did try set_time_limit....
  8. Hi there, I have no goal at all... I was just trying to have a clear mind of all the session functions and opportunities related. thats all I thought it would may become handy with a tracker system....
  9. Hi All, the session files stored as sess_SESSION_ID... How can i read them, i cant read them using fopen or file_get_contents, without any warnings.. Can someone help me out here ? Cheers
  10. Hi All, Sometimes after some calculation php may return this: 1.02563125481E+54 But how to make this into 1 number without the E+ etc ?! Cheers
  11. Then you have to check whether the input fields are empty... The same with your query Something like: if ($_POST['State1'] != '') // query if ($_POST['State2'] != '') // query I hope this helps because i still dont get it what you want exactly......
  12. You lost me, what doest work and what do you need ?
  13. // Seed generator mt_srand((double)microtime()*1000000); //All your player ids in an array $players = array(); // Shuffle array shuffle($players); // Random array index $random = mt_rand(0, count($players)); // final winner $winner = $players[$random]; I dont know what you want exactly but maybe this helps....
  14. Hi All, I created this simple function to generate random doubles..... Please your opinions! function GetRandomFloatNumber($min = false, $max = false, $dec_min = false, $dec_max = false) { // Seed the generator mt_srand((double)microtime()*1000000); // Set the default min and max if no parameter has been passed if ($min === false) $min = 0; if ($max === false) $max = mt_getrandmax(); if ($dec_min === false) $dec_min = 0; if ($dec_max === false) $dec_max = mt_getrandmax(); // units $units = mt_rand($min, $max); // Decimals $decimals = mt_rand($dec_min, $dec_max); // Set double $doublenumber = $units.'.'.$decimals; // Return double return $doublenumber; }
  15. Hi Guys, I need a function which makes huge numbers normally readable... For example 1000000 must become 1.000.000 The same with smaller or lager numbers... Does someone know a simple solution ? Cheers
  16. Just the function... Yes, According to the syntax, its ok. Dont see the point really..... I agree with requinix, not very clear.
  17. If its just a redirect after some action... Simple way: header("Location: http://www.tranceprofile.com/profile.php");
  18. As this one ? Thats not 4 numbers on each line. Please provide an obvious example
  19. Hi All, The php.ini contains a nice option called max_execution_time... I know there is a way to reduce this to 5 seconds for example, by NOT altering the php.ini..... What was this function, i cant find it anymore Cheers
  20. $sql.=" LEFT JOIN projects as pr ON prj_id = tea_projectid "; I dont know your table setup but probably its your own fault by defining wrong tables.fields.
  21. Like that yes. It depens on the rest of your code and what exactly you want to do with it. But you are on the right road now
  22. Then you should create some count on the fields..... And change $UploadAmount to that amount. You can create a simple counter if you set the name fileds like <input type="file" name="files[]" /> Then count the total amount like $UploadAmount = count($_POST['files']);
  23. Try: mt_srand((double)microtime()*1000000); $reference = mt_rand(111111111111,999999999999);
  24. Why remove and then put them back into the table ? Why not use UPDATE http://dev.mysql.com/doc/refman/5.0/en/update.html mysql_query("UPDATE table SET field1='blabla'");
×
×
  • 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.