Hello, Iam not an expert in PHP as I want to echo latest value from the table please help.
My table name is : sym_fruit
fileds name in the above tables are : id, fruitname, date
each day i will add new fruit to this table so the latest fruit name only need to print, if I didn't added any fruit name on a day i need to show a message "New fruit name was not added on today " in my table (sym_fruit) the date was storing like this ( 12/07/2018 10:14:43pm )
so each day added name are insterted to the table with autoincrument of ID , fruit name and date
I tried below code to ech but it was printitng this text : Array below is my code
<?php $pname = $con->select("select fruitname from `sym_fruit` order by `id` desc ",false); ?> <?php echo $pname; ?>