Connecting to My SQL
Posted by:
n00bneedshelp
(---.server.ntli.net)
Date: September 28, 2006 11:10PM
Ok guys here is the spill,
Here is the script I am using as suggested by MYSQL to connect to the database...
...and I have placed them in full<?php tags!
"$link = mysql_pconnect('localhost', 'root', 'rubberchicken');
if (!$link) {
die('Not connected : ' . mysql_error());
}
// make foo the current db
$db_selected = mysql_select_db('cadets', $link);
if (!$db_selected) {
die ('Can\'t use Cadets : ' . mysql_error());
}"
Thats in theory should work i have checked it through over and over! This is what I get...
"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 ''3'' at line 4"
I have played with this for hours and hours an I am stuck please help.
Cheers
the N00b (Dan)
Post Edited (09-29-06 00:13)
------
AGGHHHHHH SQL