Call to undefined function msql_query()

I have this page that when an article is clicked from the lisitng on previous page it contains this:


test3 begins like this:

$dbcnx = @mysql_connect('', '', '');
if (!$dbcnx) {
  exit('<p>Unable to connect to the ' .
      'database server at this time.</p>');

if (!@mysql_select_db('')) {
  exit('<p>Unable to locate the dm' .
      'database at this time.</p>');

$id = $_GET['id'];

  $article = @mysql_query(
    "SELECT title, keywords, description, articletext, authorid FROM articles WHERE id='$id'");
  if (!$article) {
    exit('<p>Error fetching article details: ' .
        mysql_error() . '</p>');

  $article = mysql_fetch_array($article);

  $title = $article['title'];
  $keywords = $article['keywords'];
  $description = $article['description'];
  $articletext = $article['articletext'];
  $authid = $article['authorid'];

  $author = msql_query(
  	"SELECT name FROM author WHERE id=$authid");
  if (!$author) {
    exit('<p>Error fetching author details: ' .
        mysql_error() . '</p>');

  $author = mysql_fetch_array($author);

  $authorname = $author['name'];

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
		<title><?php echo $title ?> :: </title>
		<meta name="description" content="<?php echo $description ?>"/>
		<meta name="keywords" content="<?php echo $keywords ?>"/>
		<meta name="Information" content="An article by <?php echo $authorname ?> "/>
		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
		<link href="../css/articles.css" rel="stylesheet" type="text/css" />

WHen ran i get this:

Fatal error: Call to undefined function msql_query() in D:\Websites\XXXXXX\articles\ est3.php on line 30

Line 30 is this line:

 $author = msql_query(
  	"SELECT name FROM author WHERE id=$authid");

I am probably missing a { or ) but can not find it.

Even if I hard code the variable $authid in the above MySQL_Query it still breaks with a FATAL.

THank you for any help/

actually, you’re missing a Y. It’s mysql_query()!

O - @#$%^


No prob. Those errors are the worst, you wrack your brain for all sorts of possibilities, while a simple typo is the cause of the problem. :smiley:

I know what you mean. I started to scan the mysql line but dreamweaver had them as their correct color so i looked over it. There is a bug for Dreamweaver 2004. It did not recognize that mysql was spelled wrong.


because msql is a function also for msql database servers, whic hi think is “mini sql” but not sure