Jump to content

mysty

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Everything posted by mysty

  1. I have attached the code I insert to allow me to restrict access to the table between the code. In my user database I assign the level of access. That is, I assign a 9 to the admin and an 8 to everyone else. What I would like to be able to do is add some more access levels (ie 9, 8, 7, 6, etc) and then be able to restrict access to one of the tables to more than one access level. So, the code now allows only one access level, and I want to be able to allow more than one. How would the code need to be changed? <code> <?php if(isset($_SESSION['MM_UserGroup'])&& $_SESSION['MM_UserGroup']=='9'){?> TABLE In Webpage <?php } ?> </code>
  2. The tutorial did not do exactly what I was wanting. I was really hoping to find a pre-made script or someone that could show me one that did the validation to the database. I didn't really want to learn the whole Ajax/JS language to fix this one thing. Maybe I could get a book after I solve this one small thing.
  3. I have just discovered Dreamweaver's ability to use Spry, which uses javascript and Ajax, etc. I need some help with a form that sends data to a MySQL database. What I want to be able to do is have a validation-type alert if a user enters an email address and there is already that email address in the database. Is this possible with Ajax? I don't really know much PHP and zero javascript or ajax. Is this even possible? Might there even be a pre-made script I could use?
  4. I have just discovered Dreamweaver's ability to use Spry, which uses javascript and Ajax, etc. I need some help with a form that sends data to a MySQL database. What I want to be able to do is have a validation-type alert if a user enters an email address and there is already that email address in the database. Is this possible with javascript, or do I have to use Ajax? I don't really know much PHP and zero javascript or ajax. Is this even possible? Might there even be a pre-made script I could use?
  5. SELECT jobid, person, email, phone, company, position, city, state, description, DATE_FORMAT(date, '%M %e, %Y') AS newdate FROM job_entry ORDER BY `date` DESC This is the entire recordset. When I use it as-is, the date column is blank.
  6. I just did this very thing. Looks good, except you need to remove the column names from the spreadsheet otherwise you will end up with a row with those values.
  7. I think I would like to try having the display show only the results of lastname that begin with a certain letter. That is, display the results of all duplicates (from the query above) that have a last name that begins with the letter A. What changes to the recordset would be needed?
  8. Would it be possible to split these results into 5 or 6 output lists? Apparently the database and dupe list is getting pretty large and it takes about 2 minutes to display the results. BTW - I have 20,000 names and now I have an accurate list of dupes at about 7,000.
  9. Now that I have the dupe issue working well (see my other thread entitled "Help in displaying duplicates in database") I have discovered that I have over 3,200 duplicates. Some with 2 and some with 3 or more. What I would like to do now is to prevent the dupes from being entered. So, is there a way (or what is the best way) to get a popup or error message that there is already a database row with the same firsname AND lastname entry?
  10. Fantastic! This worked after I made one very small change - change a "t2" to "t1". The last line should look like this: HAVING cnt > 1 ) AS t2 ON ( t2.lastname = t1.lastname AND t2.firstname = t1.firstname) Thanks so much. This has really been a big help!
  11. I am almost embarassed to admit that I have tried this several different ways, but to no avail. Can you be specific as to the query?
  12. Please disregard my last post (as I cannot edit it). I have done some work and am almost there. Here is what I have now: SELECT *, COUNT(*) FROM tbl_data GROUP BY lastname, firstname HAVING count(*) > 1 There is a slight problem. This shows duplicate rows where the lastname and firstname are the same. What I want is to display ALL dupes with the same first and last name. For example, if my database contains 3 rows, all with the name of John Doe, the above query will only show one row that has John Doe. I want all three rows to be displayed. Any idea what needs to change?
  13. Do you mean like this: SELECT lastname, firstname COUNT lastname, firstname AS nbr_dups FROM tbl_data GROUP BY lastname, firstname HAVING nbr_dups > 1 ORDER BY lastname, firstname
  14. I read the link for the attached, but have tried a few things, all with the same results: Error messages. Can someone help with the next step?
  15. That is almost exactly what I want. The latest shows the dupes, but shows each (lastname/firstname) dupe on only one row, with the lastname column filled with the recordid number(s). If each dupe could be shown on its own row with the last name displayed, that would be absolutely perfect.
  16. I would like all the columns to be displayed because there is information in those other columns that I would like to consolidate manually. I am not sure what "primary_keys" is in your script. I used this variation of your script: SELECT GROUP_CONCAT(recordid) AS lastname, firstname, COUNT(CONCAT(lastname, firstname)) AS nbr_dups FROM tbl_data GROUP BY lastname, firstname HAVING nbr_dups > 1 ORDER BY lastname, firstname I got a 2 column output that for each row, I got a first name and then sets of numbers, which I assume is the record number. What changes do I need to make so all the columns are displayed for the dupes listed?
  17. I forgot to mention that I would like to have the output show all the dupes. That is, if the database contains 3 instances of John Doe, that the output would show all 3 instances of John Doe's entries.
  18. I have a name & address database with 20,000 names that I would like to weed the duplicates from. I have an admin menu that has a few ways to sort this database and would like to add a dupe check to this admin menu. That is, I can sort the entries by last name, or by email address, etc. What I would like is to produce a list of dupes. I will need to show dupes (only) by last name and then by first name. I can also do this by showing only the dupes sorted on email address. This is a bit over my head, so I need help with the query. I am using PHP ver 5 and MySQL ver 5.
  19. I tried myself, but it needed a call to the hosting company to make the switch.
  20. When I created my DB, my hosting company (1and1) used MySQL 4.something. Now, I would like to upgrade. I created a new, smapll test DB and version 5 is apparently available, so I wanted to upgrade the old one to version 5. How can I do that? I know how to export the DB and tables, is it a simple matter of exporting the tables, create the new DB, and then import the tables to the new DB? I have over 14, 000 names and addresses I don't want to have to re-enter. BTW, I am not upgrading just because. Version 5 has some new things I would like to try and besides, I don't think version 4 is supported any more.
  21. Forgot to add that this is a freeware-type program.
×
×
  • 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.