Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. That code is telling you to provide YOUR credentials, hence the comments: $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name
  2. What is?
  3. Try using variable variables: $query = exec_mysql_query("SELECT * FROM sources WHERE cat_id = '$cid' AND id = '$id' LIMIT 1"); $row = mysql_fetch_assoc($query); foreach($row as $value => $key) { $$key = $value; } This should create variables like "$avi_0" and assign it to the value of $row['avi_0'].
  4. It will use the empty string and return FALSE if it doesn't find the DB. Are you sure that it's not resigning $db somewhere?
  5. I think you have to use count. feed[0][count(feed[0])-1] JavaScript, not PHP. Ooops haha, I thought you made a silly c# mistake
  6. Maq

    Ubuntu

    Yep, JavaFX works perfect on linux. There are even some nice plugins for major IDEs like Eclipse and Netbeans.
  7. I think you have to use count. feed[0][count(feed[0])-1]
  8. Maq

    Ubuntu

    It will definitely run on a virtual machine but I'm not sure about WINE. You will have to do some googling, here's a thread about it: http://ubuntuforums.org/showthread.php?t=626825
  9. Maq

    Ubuntu

    Yes. Here are a few options/alternatives. - Some may run on WINE. I haven't used it in a while but heard it's greatly improved & supports many more programs. - Use a VM. - Use open-source alternatives such as GIMP instead of Photoshop.
  10. I don't know which fields belong to which credential and even if I did, I would not have my live DB creds sent across a non-secure call, and not to mention, I don't even know how you're sending this information.
  11. Set the column DEFAULT to NULL if that's what you want when $reply_to_id is not set.
  12. my thoughts exactly Maq Oh, I didn't read the some of the previous posts, my bad.
  13. To check if a variable isset use isset. You are checking if the variable is empty, which is not the same. Can you post the table structure?
  14. I don't get how pagination has anything to do with this?
  15. Please refer to the manual - http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html INT signed - 2147483647 unsigned - 4294967295
  16. Maq

    Comparing Dates

    Change the format of the incoming date to be a timestamp, then compare, also include the room condition. Have you attempted to write the query?
  17. Turn on error reporting.
  18. It's on the bottom right now
  19. If it works then it's syntactically correct or else JS craps out and stops working altogether. Here is your code formatted to my preference so it's easier to read: <br /> $(document).ready(function()<br /> {<br /> $(".thumb").thumbs();<br /> });<br /> ///////////<br /> $(window).load(function()<br /> {<br /> $("li").each(function(index)<br /> {<br /> $(this).delay(300 * index).fadeIn(600);<br /> });<br /> $("img").each(function(index)<br /> {<br /> $(this).delay(300 * index).slideDown();<br /> });<br /> //////////<br /> $("#go3").click(function()<br /> {<br /> $("li").each(function(index)<br /> {<br /> $(this).delay(100 * index).hide("slow");<br /> });<br /> /*$("#lista").animate({<br /> width: "70em",<br /> marginLeft: "0",<br /> }, 1500 );*/<br /> });<br /> /////////<br /> $("#go4").click(function()<br /> {<br /> $("li").each(function(index)<br /> {<br /> $(this).delay(100 * index).fadeIn(600);<br /> });<br /> });<br /> });<br />
  20. You should have an auto-incrementing column that will automatically assign a unique value to each entry.
  21. The 'w' parameter for the date() function will return the will give you a number for the day of the week, from 0 for Sunday through 6 for Saturday. You will probably have to check to make sure the date is not 0 or 6.
  22. next 10 business days.
  23. Check out this post: http://www.phpfreaks.com/forums/index.php?topic=334237.msg1574055#msg1574055 You can reformat the date however you want, look at the date format parameters: http://us2.php.net/manual/en/function.date.php
  24. Example #1 Convenient way how glob() can replace opendir() and friends. foreach (glob("*.txt") as $filename) { echo "$filename size " . filesize($filename) . "\n"; } ?>
×
×
  • 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.