javascript
Brief description  about Online courses   join in Online courses
View sandeep kumar mahala 's Profile

smarty

//db configuration
include "config.php";

if(!($db = @mysql_connect($server, $db_user, $db_pass))) //connect to database
die("Couldn't connect to the database.");
if(!@mysql_select_db($db_name, $db)) //select database
die("Database doesn't exist!");

$sql = "SELECT * FROM users";

if(($result = @mysql_query($sql, $db)) == 0)
{
echo "nDatabase error: ".mysql_error()."
n";
die("MySQL Said: " . mysql_error());
}

$user = array();

?>




while($tmp = mysql_fetch_assoc($result))

{
?>



}
?>


Not able able to convert thiscode into smarty.
Asked by sandeep kumar mahala | Apr 1, 2011 |  Reply now
Replies (2)
View akula pavan kumar 's Profile
Hi,
Please let me know how can one convert the above mentioned code with out having any idea about MYSQL quires? and even as per your course curriculum one can learn MYSQL only after learning PHP. If not, I request you to let me know the answer for the above mentioned code with a detailed explanation.

Regards,
Akula Pavan Kumar.
Dec 23, 2012
View teacher siliconindia 's Profile
This code wrote only for php.
Apr 12, 2011