Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. you could check your form values against the returned values and build your update query to refference only the fields that don't match the original database return. if you are doing this over multiple pages you would want to put your database return into a session variable for easier access on the second page.
  2. glad it's working for you.
  3. check the order that you are passing the variables into the function, it should be set for HTML messages and generic binary data attachments (octet-stream). I have it in use here and the emails have the html contnent that I expect with xml attachments (having altered the content-type for the attachment). Read through the comments in the function, they should help you see what's happening where.
  4. Another thing you could try would be entering this in the MyAdmin query window: CREATE DATABASE dummy; and if that works try dropping that database with DROP DATABASE dummy
  5. I think you missed the part of AyKays post that said "Dont use global....EVER". There is a good reason for that, honestly. You could write some CASE logic to assign a hashcode dependant to each value in the status and use that in the css.
  6. OK, I have no idea why you are using group by, there's no good reason for it with the data you have presented, but I expect you're trying something like: SELECT email, firstname, lastname FROM tbl_data WHERE tbl_data.id NOT IN (SELECT id from tbl_processed) I tested the code you posted and it does not include the row with an id of 4 when I do it....
  7. yeah....I got no idea what's actualy happening there. Shouldn't this be in the "Other frameworks" section?
  8. I don't know, I have never tried to ALTER TABLE to swap in a timestamp field (don't even know if it would be possible because of the nature of the field), I've always either used it from the start or not at all. You would be better asking in the MySQL forum for that info.
  9. My, this is popular just now... First and best thing to do is check the go-daddy documentation to see if there is deffinition of the error code in their mail settings/support pages. If that fails I wrote a function for sending mail through the PEAR Net_SMTP class which returns the full server response array, code and description (assuming the server provides one) which you can find here: http://www.phpfreaks.com/forums/index.php?topic=351896.0 if you use that for debug then you will be quickest doing a vardump on the return.
  10. strange, on my xamp for windows it works fine (running from command prompt anyway). do you know how to access your mysql server through the console? could you try running your drop query from there?
  11. you can't, no time information is included with the date in the form, so it's not available when you are manipulating it with php for your date input. The only three ways I can think of off the top of my head would be : 1:- include time information in the form, 2:- remove the date input from the form and calculate your date time as strtotime(date()) 3:- remove the date input from your form and change the database field to a timestamp with default value of CURRENT_TIMESTAMP() and/or ON UPDATE CURRENT_TIMESTAMP()
  12. it's common to stick with one direction of join, and left is the most popular, so you would normaly code a query to use only left joins (and any inner / cross joins that were also required) using the layout that kicken explained.
  13. sounds like a permissions issue. Has your book made you set up a new user account?
  14. try this: <div class="grid_12" id="loggedin" STYLE="background-color:<?php echo $current_user->status; ?>"> <div> <ul id="loggedin"> <li><?php global $current_user; get_currentuserinfo(); echo 'Status : ' . $current_user->status . "\n";?></li> <li> <?php if ($current_user->status=="RED") echo "Red info"; ?> <?php if ($current_user->status=="GREEN") echo "Green info"; ?> <?php if ($current_user->status=="BLUE") echo "Blue info"; ?> <?php if ($current_user->status=="YELLOW") echo "Yellow info"; ?> </li> </div> </div>
  15. another thing we will need to know is how you are defining which 4 dates are shown out of all the dates in the table that will match each location id.
  16. sorry, I must have missed it Have you tried passing the form direct to the php page without parsing it through the JS yet?
  17. what's the chances of seing the actual form?
  18. can't you use your datetime field as a marker? capture time sat start of cronjob, perform cronjob, update only fields where datetime field <= cronjob start time?
  19. as PHP is run on the server, not the client, the only way you could do this would be to load the info into a javascript array and have an onClick event or use a form button and AJAX to reload the innerHTML of a div on your page. once PHP has done processing that's it without a full page refresh.
  20. Now that you're done with your little hissy fit, I apologise, I thought I had responded! I changed that line as suggested, and I get THIS: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,1' at line 1 So, was none the wiser! Cheers, Dave lol that's not me having a hissy fit, that's just fact. and from your error mesage there, and from the code revision you posted just before that, you still havn't made the change or you would have the full query at the end of your error exactly how it is being sent to the server - thus helping everyone get a better understanding of what exactly is causing the problem. So seriously, if you go somewhere and ask for help, then ignore that help, how should people react?
  21. neerly there: $query = "SELECT name, address, city, state FROM customers WHERE sku = '12345'"; $result = mysqli_query($dbc, $query) or die(); $name = array(); $address = array(); $city = array(); state = array(); while ($data = mysqli_fetch_assoc($result)) { $name[] = $data['name']; $address[] = $data['address']; $city[] = $data['city']; $state[] = $data['state']; }
  22. no worries, glad you got it working
  23. perhaps you should have paid more attention in class if your looking for specific help you will need to show what you have already and give a clear description of what it is doing V's what you need it to do.
  24. try this: $sql = <<<SQL_BLOCK SELECT product_option_value_description.product_id, product_option_value_description.name, product.image, product_option_value.product_option_id, product_option_value.product_option_value_id FROM product_option_value_description LEFT JOIN product ON (product_option_value_description.product_id = product.product_id) LEFT JOIN product_option_value ON (product_option_value_description.product_id = product_option_value.product_id) WHERE product_option_value_description.name LIKE '%$partialNumber%' GROUP BY product_option_value.product_option_id SQL_BLOCK;
  25. try: <form name="form1" method="post" ACTION="editor.php"> <textarea rows="10" cols="60" id="code" name="code"><?php echo '<pre><?php ?></pre>'; ?></textarea> <span class="submitbutton">Test code</span> </form>
×
×
  • 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.