how do i change from msql to msqli the below statement, am learning this mysql but keep getting Deprecated error.
And where can one get an easy tutorial on how to make the changes.


$displayImages = "";
    if($_GET['cat'] == "juice")
        $sqlSelProd = mysql_query("select * from tblproduct where prod_cat = '$_GET[cat]'") or die(mysql_error());
    else if($_GET['cat'] == "junkfood")..............


Recommended Answers

All 3 Replies

just change msql to msqli where ever you find it.But you also can see online the structure of both commands and thier parameters and change accordingly.e.g mysql takes 2 parameters mysqli may take three so check it out online and change accordingly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.