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 dencom 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: *

  • Users: yebaws
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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"...
  6. 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...
  7. 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...
  8. 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?
  9. yebaws

    magic quotes

    Hello, I am getting a lot of added backslashes in data that has been inserted and then modified and called from a database. When sending to the database I have been using mysql_real_escape_string. As I understand it, when I use this, backslashes will be inserted in front of quotes etc before...
  10. yebaws

    magic quotes

    Hello, I am getting a lot of added backslashes in data that has been inserted and then modified and called from a database. When sending to the database I have been using mysql_real_escape_string. As I understand it, when I use this, backslashes will be inserted in front of quotes etc before...
  11. yebaws

    time / date function?

    When a new entry is added to a table, the timestamp is added with CURRENT_TIMESTAMP. I want to run a query to find all entries in the table that were added, say, 330 days ago or more. I can think of a very roundabout way of doing this, and know that there must be a simple way to do this, but...
  12. yebaws

    distinct values

    I have a table with several columns that have repeated values. I want to select and list only the unique values from 2 columns and list them alternately. This code works as expected to select unique vales from column 'listing_location' where area column is 'area1' and list them: $query = "...
  13. yebaws

    insert null value

    Hello, I have a page for inserting data into an sql database with an html form. It looks a bit like this: $SQL = " INSERT INTO listings "; $SQL = $SQL . " (paid, business_category, businesscategory, business_name,.... $SQL = $SQL . "...
  14. yebaws

    unique_array?

    I have an SQL database that lists businesses details and includes a columns for location and business category. Lets say, in "Townsville" there are 9 businesses - 4 hotels, 3 shops, 2 bars and no garages. So hotel 1 will have column "business category" = hotel, "location" = townsville, "name"...
  15. yebaws

    help please

    Can anybody see what the error is here please? ERROR: 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 'WHERE id = 3' at line 1 UPDATE instructors SET course1 = 'Scottish Research Online', course2 = 'Scotland...
  16. yebaws

    Netscape 7.1 nightmare

    Help! I've designed a site - table free, W3C strict 1.0 compliant (well, it will be once I've tidied things up) and everything dispays fine in opera, ie 6 & 7, firefox, but in Netscape 7.1 the text in nearly all of the divs has moved to start at the top left of the page aaaggggghhhh...
  17. yebaws

    if statement

    I have a list of dates in a database where the months area displayed as 2 digit numbers. I want to extract them and print them as months (january etc) below is my attempt to do this, which seems to correct syntax and does something, but not quite what I expected (the months all come back as...
  18. yebaws

    error with WHERE

    could someone please explain this error. It's driving me nuts - I just can't see what's wrong with the query SQL query: UPDATE coursedescriptions SET coursenumber = '333', coursetitle = 'ctitle 6 mod', coursedescription = 'description 6', instructor = 'sssssssssss', courseoutline1 =...

Part and Inventory Search

Back
Top