Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. SELECT model, SUM(quantity) as total_quantity FROM table GROUP BY model
  2. Since it's just for one thing, then you can save the current count in a text file. Search for PHP tutorials related to emailing, form processing, and read/write of files.
  3. Echo the entire query so you can see, but it's probably because you don't have a space after the table name, so it looks like the tablename is xxxWHERE and then the username = part causes an error. (To prevent this sort of thing, I always do the space on the new addition, so it'd be " WHERE ..." and " AND ...."
  4. You're putting that inside a string, which makes it the string 3600*12. Just do the math and save it. define('VARIABLE', 43200);
  5. I'm sure it's working perfectly. 1. Use forum code tags. 2. Post desired functionality not *just* a bunch of code that you copied from the internet 3. Post what happens when you use it. You most likely need to change the permissions on your folder, and use a full path for the folder, not just the images/ part.
  6. Yeah that's a URL, not a config file. You can't just put a URL as plain text in a file and call it a config...
  7. I see now, thanks for explaining. My point about mismatched parens was still true though, he had an opening with no closing, and then bad PHP syntax. I agree with scootstah that OP needs error reporting on.
  8. $sql = mysql_query("INSERT INTO app_ads(app_id, app_ad, active) VALUES(".implode(',', $insert_data).""); It should have parens, but you are missing one of them. Try doing it this way, it makes it easier to see. In your example, you have malformed SQL, and then when you changed it you messed up the PHP syntax. Too many quotes and parens in one line makes it easy to happen. $insert_data_str = implode(',', $insert_data); $query = "INSERT INTO app_ads(app_id, app_ad, active) VALUES($insert_data_str)"; $result = mysql_query($query);
  9. I believe you add those two lines above your current rule.
  10. They threatened to sue me for not doing the work. That's why it lasted all of 2 minutes. I also had a time where I contracted with a design firm. They had a client who sent me emails for years after the design company went under, expecting me to support the site for free. Sorry buddy, my contract was with another entity, and they don't exist any more. I tried to be nice and help them a little, and surprise surprise, NEVER GOT PAID. It wasn't worth it to go after them.
  11. Finished it, thought it was good. I've had trouble with both clients and people I've hired. One time I had a potential client who never did sign the contract, but then threatened to sue me. (No, I never did any work, you didn't sign the contract). My lawyer ended that one quickly. The other funny time was someone who I hired to design a site. They did sign a contract. They did a few drafts, and I decided they were not up to the task after all. Now, during this time they had sent me about 4-5 drafts, and in the emails these drafts were in, said things like "I spent 15 minutes on this, while I was feeding the baby, so if it's not good that's why". I let them know I was going to hire someone else, and would be sending them the termination fee we had agreed upon. They said not to send anything, I sent back another request for where to send the payment, and they never responded. I set aside the money and moved on. A few months later, I get a lawyer calling me saying I'm using someone else's work. She hired a lawyer and said I was using her design for the site. (They were nothing alike). My lawyer sent her a fuck off letter, with copies of her emails that showed how her work was nothing like the design I used, her admission that she did not spend the time on the design she had committed to, and my attempts to pay her and her refusal. They never responded.
  12. 1. Use =, not LIKE here. 2. Echo the query first to make sure it looks the way you expect. 3. Check for mysql errors. mysql_query has plenty of examples. 4. Switch to mysqli
  13. <script type="text/javascript"> sendSubmit('<?php echo($out); ?>'); </script>
  14. Not a freelancer anymore, but watching it, and WAYYYY too much intro. Geez.
  15. error_reporting ini_set
  16. Ensure error reporting is turned on and set to E_ALL. This belongs in third party, btw.
  17. That gives me the column's value, or a 0, I want either a 1 or 0, like a boolean of if the field has a value or not, not the actual value. What I really need is Y/N. SELECT IFNULL(group_id, 0) FROM group Gave me 1,2,3,4,5,6,7 etc. Edit: thank you - the second was exactly it. I just couldn't remember if there was a shorthand for it, but IF is what I needed.
  18. http://php.net/manual/en/function.error-reporting.php
  19. WHY did you try doing that? First of all, you need to turn on error reporting to E_ALL, so you can get proper errors and notices. You'd have seen that you're doing several things wrong. 1. Why, if your table contains one column called rank, are you looking for rank1, rank2, rank3 and rank4? 2. strings as array keys must be quoted. $userinfo['rank'] will have your rank. 3. Then it's just a simple less than or equal to comparison.
  20. I'm having a brain fart... how do I do: SELECT col FROM table and if col is NULL, I want a 0, otherwise I want a 1.
  21. Look through your .php files, not config files but the processing code, for something that has $type_selected or $types, and is not a smarty .tpl It might be in the add_user() function. You don't have enough code here to work with. You will probably need to hire someone to help you since this is not your code, and you don't understand it.
  22. Then remove them anyway. Have you echo'd the values of $to and $from to make sure they are what you expect?
  23. Magic? Post your code.
×
×
  • 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.