Jump to content

Email field (varchar 60) - can retrieve data using phpmyadmin


Recommended Posts

Hi,

 

I created a login table where email are stored in varchar field, but can't retrieve the record with this field with a simple sql statement.

 

select * from login where email = '$email';

 

Results retrieve 0 records.  I tried the same using phpmyadmin default sql, still the same.  Than I decided to delete and inserte records again.  to my surprise this time i can retrieve the records.    I don't why this had happened in first case, but i am bit worried if this happens on live pages for my clients.

 

Any ideas why this problem occured?

you are right, it may be that my data has got corrupted, cause i did some modifications to my login table and created an index on email field.  But how do i know my table has got corrupted any tools to check the health of your table and data.

 

As far as sql is concerned i am using the default phpmyadmin default sql.

 

 

i have sometimes copied data from a different program (like wamp) to another program (like easyphp) and the data has become corrupted. it usually says that it cannot read the file etc etc. well thats what it says to me.

Try reading up on this:

http://www.databasejournal.com/features/mysql/article.php/3300511

 

There are three ways to check tables. All of these work with MyISAM tables, the default, non-transactional table type, and one with InnoDB, the most mature of the MySQL transactional table types. Fortunately, MySQL now allows you to check tables while the server is still running, so corruption in a minor table need not affect everything on the server.


  •    
  • The CHECK TABLE SQL statement (obviously the server must be running for this)
       
  • Running the mysqlcheck command-line utility (the server can be running)
       
  • Running the myisamchk command-line utility (the server must be down, or the tables inactive)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.