Jump to content

xiao

Members
  • Posts

    163
  • Joined

  • Last visited

    Never

Everything posted by xiao

  1. What I need: - Get the day and month out of a mysql 'date' cell - Transform the month to text - Take the 1st 3 characters from the month name What I have: $date = explode("-", $info['submitdatum']); $day=$date[2]; $month=$date[1]; I'm stuck now
  2. xiao

    db optimization

    I always store IDs, even if I don't plan to use them at first.
  3. xiao

    combine queries

    And how do I display those results?
  4. I have this: $query = "SELECT * FROM jobs WHERE (employer_id='".$rij['id']."' AND complete='0')"; $query = mysql_query($query) or die("Fout in query"); $act_jobs = mysql_num_rows($query); $query = "SELECT * FROM jobs WHERE (employer_id='".$rij['id']."' AND complete='1')"; $query = mysql_query($query) or die("Fout in query"); $afg_jobs = mysql_num_rows($query); The first variable contains the number Active jobs, the second one contains the number of Jobs that are closed. Is there a way to shorten this? And maybe combine everything in 1 query?
  5. e.g.: I have 2 tables: 'job' & 'employer' Job contains stuff like description, title, type, ... Employer contains name, address, ... I want to show the employer in my job description. I can do 2 things: - Store the name of the employer in the 'job' table - Store the employer's id in the 'job' table and get the employer's name from another query. the 2nd option saves space and is the right way to do this, but doesn't it take more time for the page to load when I do this? Since it's an extra calculation.
  6. just store the links to pictures or their names in mysql. Like picture1.gif etc.
  7. Something like this? http://www.softpedia.com/get/Internet/WEB-Design/Source-Site-Protectors/Web-Source-Grabber.shtml
  8. No problem. Did it work? Or was it something else?
  9. It's best to do -1 for up and +1 for down, so you can sort ASC and when u add a new entry, just give it the order-of-the-last-entry+1 You would also have to change the order of the entry above the one you move up to -1. And +1 with the one under down. I'll explain: List: Entry 1 [uP][DOWN] (order=1) Entry 2 [uP][DOWN] (order=2) Entry 3 [uP][DOWN] (order=3) If you click UP for entry 2, it's order becomes 1, but Entry 1 also has order 1, so you'll have to do Entry 1+1. Visa versa for DOWN.
  10. Is that the whole code? Do you use REGISTER_GLOBALS? else replace if ($setup == "go") { with if ($_GET['setup'] == "go") {
  11. Edit: SOLVED - My problem was that I used mysql_clode() in the details.php page. That was a retarded thing to do I know there's a special section for mysql problems, but I think this is PHP related and doesn't have much to do with my mysql. I get this error sometimes: Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\jobs\login.php on line 12 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\jobs\login.php on line 12 On line 12, I just run $result = mysql_query("SELECT y FROM tabel WHERE x = '$x'"); I include my login.php in my header. And the login form is in my (included) navigation bar. In my header I also include my database connection, so I don't understand why it tries to login as 'ODBC'@'localhost' without a password. The database connection works fine for the rest of the website. If it helps, I used this login script: link Edit: I found out that I get this error only on 1 page: details.php But I use the same structure on every page... <?php include("header.php"); //CONTENT include("nav.php"); include("right.php"); include("footer.php"); ?> Are there some common reasons for this to occure?
  12. It's not too much imo. Looks nice. Too bad about the gap though.
  13. How do you set multiple conditions in a query? Like this? SELECT X,Y FROM table WHERE X='$x' AND Y='$y'
  14. I like the old one more too.
  15. It's always the same CAPTCHA code.
  16. I'm 100% sure you can save as .gif, .jpg, .bmp etc. in GIMP
  17. I agree, it annoys me a little when people band the term professional around in the context that the 'professional' knows anything and everything about a subject. They're a professional because it is their profession, they don't have to be an expert. I'd expect them to be tbh.
  18. I make mine in Photoshop
  19. 'Too many ads' is what I think. I count 4 ads on the index page, but I have no idea what the website is about.
  20. xiao

    [SOLVED] WOW?

    Probably HTML, maybe a little javascript here and there
  21. Meh, there are too many crappy websites for which has been paid to call everyone who gets paid to code PHP a pro Another thing... I got the results back for my exams at school. I got 99% for PHP (the 1% was some stupid error, no idea which one, but it cost me a point ). It was all basic PHP though (reading, writing from a DB, form submission, ...). Am I an intermediate now?
  22. Should be fixed now, nice find
  23. I think I'm gonna leave it like that. If a hacker wants to see my layout without CSS, I'll give him that opportunity :-)
  24. I think I fixed that. Used a whole new way of filtering. Can you retry please? I also think I fixed the DOS. Could you please give it another go? To answer the question about the 4 characters: Because I don't want the top 100 to be a,i,e,o,u,1,2,3,4,5,6,7,8,9,10,11,12,...
×
×
  • 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.