Question: I found another thread with this similar question but the query wasn't working for me for some reason or another.

I have a table like so:

> 
> id | 1 1 5 3 5
> 
> 
> 

I need to use just SQL to echo out the most duplicated number

For instance, that would output:

> 
> id | 1 5 3 5
> 
> 
> 

If that makes sense.

How would I achieve this?

Thank you so much

Answer: 
You have a problem here:

```
echo 'Passwords don't match';

```

You need scape single quote as:

```
echo 'Passwords don\'t match';

```

or

```
echo "Passwords don't match";

```

NOTE: Your code is vulnerable to sql injection, you should use **mysql\_real\_scape\_string()** before to pass yours parameters as sql query.

I suggest:

```
$username = mysql_real_scape_string($_POST['username']);
$password = mysql_real_scape_string($_POST['password']);
$repassword = mysql_real_scape_string($_POST['repassword']);
$email = mysql_real_scape_string($_POST['email']);

```

**TIP**: When your are testing (in dev environment) mysql querys, you should combine `die(mysql_error())` at the end of line to check if you has a problem like as:

```
mysql_query('your sql') or die(mysql_error()).

```

If you have an error, this cause your app die an show the mysql error.
See [this reference](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php/12770089/#12770089).

This error shows the earliest time it encounters a problem. The problem is on that line, or on a previous line. In this case you didn't escape a quote, so the parser found the rest of your string while it expected a `,` or `;`. If you look at the colouring of your code, you'll see that more easily. The correct line would be

```
echo 'Passwords don\'t match';

```