Hi,
I’m trying to do this tutorial to do a blog in flash. http://www.webmonkey.com/webmonkey/03/40/index0a.html?tw=programming
When I get to the php section It’s not working. I’m trying to import the php file with phpmyadmin and I keep getting an error.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘<?php
mysql_pconnect (“yourHost”, “yourUserName”, “yourPassword”)’ at line 1
My code is:
<?php
mysql_pconnect (“yourHost”, “yourUserName”, “yourPassword”);
mysql_select_db (“blog_db”);
$qResult = mysql_query (“SELECT * FROM blog_entries ORDER BY id DESC”);
$nRows = mysql_num_rows($qResult);
$rString ="&n=".$nRows;
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($qResult);
$rString .="&id".$i."=".$row[‘id’]."&"."&title".$i."=".$row[‘title’]."&"."&date".$i."=".$row[‘date’]."&"."&entry".$i."=".$row[‘entry’]."&";
}
echo $rString."&";
?>
Obviously I didn’t put my username and password on here :-P.
Anyway, I’ve never used databases or php before but I was using this tutorial to learn but this part isn’t working. I read that someone else tried doing the same tutorial and they went from text edit on mac to puretext and it fixed it. I have a mac so I don’t think I can use pure edit. I tried something called text mate and that’s not working either. If anyone could help me i’d really appreciate it. I’m really trying to learn this stuff and a lot of the books on it are really complicated. This tutorial was good until this part.
Holly
Thank you ahead of time.