Question: I have this code.c in ubuntu in terminal 
but when I compile it with gcc this error appeared

```
cod2.c: In function ‘main’:
cod2.c:9:11: error: subscripted value is neither array nor pointer nor vector

```

why is that?

```
int  main(int argc , char ** argv){
    mkdir(argc[1] , 00755);
    return 0;
}

```

Answer: 
Date stored in varchar is not a real date and hence the order by also does not give you what you want. The best approach would be store date always in mysql native data types. However in your case you can use `str_to_date()` function to convert the varchar dates to real date and then use it for sort something as

```
order by str_to_date(date_created,'%Y-%m-%d %H:%i:%s');

```
```
$sql = "SELECT * FROM `axnmrs_cases` WHERE `vin` = ':vin' ORDER BY `date_created` ASC LIMIT 30";

```

Already tried something like this?