Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. yebaws

    sql boolean error

    thanks again
  2. yebaws

    sql boolean error

    GOT IT! Thanks! The query, on occasion was coming up: The query run was: SELECT full FROM coursepwds WHERE courseid = 2332013T.B.A. Those .'s shouldn't be there... For the future, is there any way that I can get PHP to write more error details to the log file to help diagnose problems without...
  3. yebaws

    PHP Email issue

    Try changing if ($filename<>null){ $message .= " to if ($filename<>null){$message = $message. "
  4. yebaws

    sql boolean error

    This is driving me nuts... Ever since the php version on my server has been upgraded to ver5 I get error_log files appearing in all my sites that use databases with pages of entries like this: PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in...
  5. yebaws

    lock mysql table

    great, problem solved! Thanks for the replies!
  6. yebaws

    lock mysql table

    Could be one for sql forum rather than php, so please feel free to move it... I am writing a php script that modifies a mysql database which more than one person may be accessing simultaneously and I need to lock the table for a short time to stop anyone else making modifications at the same...
  7. yebaws

    count arrays

    Thanks for that and the tip about explode. Before I start testing this, from what I can see, if I run your code on the following cart contents: product1 : quantity1 : price1 ~ product2 : quantity2 : price2 I'll get $Products[0] = "product1" $Products[1] = "quantity1" $Products[2] = "price1"...
  8. yebaws

    count arrays

    I'm still learning this stuff, so please bear with me... I have a shopping cart which returns a variable on checkout completion containing the cart contents. The variable looks like this: product1 : quantity1 : price1 ~ product2 : quantity2 : price2 ie: parameters for each item in the cart...
  9. yebaws

    search

    I know - the database should be normalised, but I didn't write it, so please give me a break.... It would take forever to do it and I need a quick fix for now. And I've found it: FIND_IN_SET is the function I'm after.
  10. yebaws

    search

    yes, I realise that the CSV,s are making things more complicated and that changing the structure of the database will be the best solution in the long term, but that will involve a *lot* of work. I think I'm getting there with check boxes, but won't post anything yet as it's still in progress...
  11. yebaws

    search

    need some advice on the best way to make a search page in php for a mysql database. The database contains 3 columns with CSV's. The CSV's are all taken from a set list of about 20 different values. I want users to be able to search for each row for different values using dropdowns or...
  12. yebaws

    array from html form

    Thanks for this and the point about register_globals. I changed my code to make my post simple. What I actually want to do is put the array into a database as a single string 'apples, pears', so I need to make the arrays into a single string.... "imlode" I think, but I'm not getting the results...
  13. yebaws

    array from html form

    I think this should be very simple, but I'm having problems as usual... I want to build an array from checkboxes on a form. My form looks like this: <input name="fruit1" type="checkbox" id="fruit1" value="apples" /> Apples <input name="fruit2" type="checkbox" id="fruit2"...
  14. yebaws

    dropdown list from mysql database

    Thank you. That does the job. I was hoping there might be a slightly less long winded way to do it as I have a bit more than apples and pears, but I guess not.
  15. yebaws

    dropdown list from mysql database

    I want to set an "initially selected" option for a drop down list to be the same as the data in a field from a database query. For example: <select name="fruit" id="fruit"> <option value="apples">apples</option> <option value="pears">pears</option> </select> If I query the database...
  16. yebaws

    date

    Thanks - works with INTERVAL, so I'll put it in. But it did seem to work without the DAY and the INTERVAL....
  17. yebaws

    date

    mind you, if I take out the DAY an just use CURRENT_DATE - 30 it seems to work fine...?
  18. yebaws

    date

    Thanks, Looks more logical than my approach, but the DAY bit returns a syntax error when I write the command just as you've written it?
  19. yebaws

    date

    Trying to extract rows from a database where the renewal_date is sooner than 30 days with this code: //get todays date $today = getdate(); //format date to the same format as "renewal_date" datestamp colummn in database ie YYYY-MM-DD - "mday" = day of month, "mon" = month, "year" = year...
  20. yebaws

    &amp;amp;

    Next question..... If I try and send a field containing &amp; to my database, it appears there as & and when I call it again, it also appears as &. To be valid html, I want it to be &amp;. Apart from replacing each occurrence of & with &amp; when I call the field, is there another way to do it?

Part and Inventory Search

Back
Top