开发者

Connecting MySQL with JavaScript Calendar

<?php
$host = 'localhost';
$dbusername ='root';
$dbpassword ='';
$database ='mp19';

$link =mysql_connect('localhost', 'root','12345678');
$db_selected = mysql_select_db('mp19', $link);

if (!$link)
  {exit("Connection Failed: " . $link);}

$sql="SELECT * FROM 3-33";
$rs=mysql_query_exec($link,$sql);

if (!$rs)
  {exit("Error in SQL");}

mysql_close($link);
?>

These are the codes I generated for the connection of ph开发者_运维问答pmysql and javascript calendar however there seems to be an error with the connection. Can someone help me check the codes for this connection? :/

Also, I'm not sure how to incorporate these codes into the javascript calendar. The calendar is a hardcoded one which makes use of only javascript. My intention is to print the tasks stored in the phpmysql database in the javascript calendar but I'm totally lost. Can someone please advice me on how to continue? Thanks in advance


There is nothing called mysql_query_exec() in php

use mysql_query() in this way

 mysql_query ( string $query [, resource $link_identifier ] )

mysql_query($sql, $link);

you are passing parameter wrongly

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜