Jump to content

techiedude

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

techiedude's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. try this: SELECT DISTINCT r.items from rates r, offers o where... It\'s telling you it\'s ambiguous because it doesn\'t know which column you want from which table because they both have the ITEM column. Look at the MYSQL documentation for \'alias\'
  2. Did you try \"SELECT DISTINCT ITEM from <first_table>,<second_table> where...\" That would probably strip out the duplicates.
  3. Are you using SELECT,SHOW,DESCRIBE or EXPLAIN statements in your sql statement? What\'s the error message? Does the SQL statement return valid data?
  4. First off, did you make sure that your query actually returns real data? If it did, then your variable $data will contain the results of each row within each iteration of your for loop. pg_fetch_array will only return the data for the row you are specifying Try using print_r($data) to see if there\'s anything in there: $data is an array with each column represented as an item in the array so: $data[\'a\'] contains column data for a, so does $data[0] $data[\'b\'] contains column data for b, so does $data[1] etc. hope that answers your question.
×
×
  • 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.