How is the external HD formatted? It must be as shown in this screenshot and connected by cable directly to your Mac:

If it is launch iPhoto with the Option key held down and see if there is more than one library. If there is more then one open each and check to see what the contents of each are. You may have to merger them to get all of your photos into one library.
Otherwise, restore the backup copy of the library that was made just prior to this happening. That should get you back to where you were.
If there is only one library or you don't have a current backup apply the two fixes below in order as needed (make sure you have a backup of the library) before hand.
Fix #1
1 - launch iPhoto with the Command+Option keys held down and rebuild the library.

2 - apply Option #4 to rebuild the database.
Fix #2
Using iPhoto Library Manager to Rebuild Your iPhoto Library
1 - download iPhoto Library Manager and launch.>Click on the Add Library button,

2 - select the library you want to add from those in the selection window.
3 - make sure that in the rebuild window the checkbox "Scavange orphaned photos" is checked.

4 - now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option

5 - in the next window name the new library and select the location you want it to be placed. Click on the Create button.
Note 1: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments. However, books, calendars, cards and slideshows will be lost.
Note 2: Your current library will be left untouched for further attempts at a fix if so desired.
