My name is zhuxiaoquan,I come from china.It`s my first time to study php+mysql,yesday,I try an example of the book "Build Your Own Database Driven Web Site.pdf".when i try to run apache ,an error came up!I rellay have no idea! Hellpme! I have poor English skills !
"An unhandled win32 exception occurred in httpd.exe[4048]",for this I tried to unistall vs 2008.
the code:
Code: Select all
//query
$result = mysqli_query($link, 'SELECT id,joketext FROM joke');//1
if (!$result)
{
$error = 'Error fetching jokes: ' . mysqli_error($link);
include 'error.html.php';
exit();
}
//
//loop
while ($row = mysqli_fetch_array($result))
{
$jokes[] = array("id" => $row['id'], "text" => $row['joketext']);
}
the error with the code above will occurred. but when I use the sql "'SELECT joketext FROM joke'" without id,the error Disappeared ! so . I won`t get id that I cant perform the delete Functions !
Accessories are the codes!
Do you know why ?Tell me ,Thank you!
2009-11-06
--------------------------------------------------------------------------------
country:China,
city:Beijing,
name:zhuxiaoquan(???)
msn:54zhuxiaoquan@gmail.com