Jump to content

alcoholic1

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

alcoholic1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i just added more to the code above so it only displays once with more than 1 but still groups it all together. "SELECT guid,name,count(*) as idgroups FROM guid GROUP BY guid having count(guid) > 1"
  2. thx for the responce unforchantly when i try this a get a mysql error 1111 and output of invailed use of group function. i have tryed "SELECT id,name,count(*) as idgroups FROM guid GROUP BY id" but it groups simular together so only one is displayed
  3. bassically i have a repeat region displaying all the data atm e.g IDS Names f1e162c2 death f5291b9f Rowger f6814a1f |MOB|B-DoGG f6814a1f demolition[RUS] f6814a1f Player0 f7f44761 frog f8e840a9 mob|roxygirl fb69016b «dolllars» now i wish to expand on this and only show ID's that have more than 1 entry. like it would the out put below from the above example f6814a1f |MOB|B-DoGG f6814a1f demolition[RUS] f6814a1f Player0 can it be done in a sql statement ? the current one is "SELECT * FROM guid ORDER BY IDS ASC" or do i have to make some kinda of php code that checks if theres is more than 1 of the same ID"S ???
  4. im basically looking for a simply way to display every entry in the database in a table on the php page any one know a good way ?
  5. Hey i need some help Refreshing my memory with some PHP i have a form and that has 2 input box's lets say to keep it simple Name,Age and a sumit button basically when the submit button is hit i need it to check if the Name(Primary Key) exist if it dosent insert it and if it dose exist and update the infomation wondering if it will be kinda like below [code]<?php mysql_connect("localhost", "root", "####") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); $result = mysql_query("SELECT Name FROM testDB where Name = 'alcoholic1' ") or die(mysql_error()); if  <> result.EOF then         $result = mysql_query("UPDATE testD SET age='22' WHERE age='21'")     or die(mysql_error()); else    mysql_query("INSERT INTO testD    (name, age) VALUES('Sandy Smith', '21' ) ")    or die(mysql_error()); end if php?>[/code]
  6. Hey i had a power black out the other day and it seams it damaged mysql as it also fryed my ntdetect.com and some other files but i fixed them but still cant get mysql to work agian the error code im getting is Error: 1023 SQLSTATE: HY000 (ER_ERROR_ON_CLOSE) is there any think i can do to fix this problem it is mysql 4.1 and im on XP pro?
×
×
  • 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.