zbrahead Posted May 20, 2006 Share Posted May 20, 2006 I have produced this script after a few days on it and i managed to debug it to the query, now the query function provides an error message ( a custom or die() one) and i have tinkered with it for along time and cannot fix this. Any help would be GRAVELY appretiated , im at breaking pointhere is my script: (there is html below but u dont need to see that [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /] and passwords in mysql_connect function covered with asterisks for security purposes)[code]#get page datafrom url$page = $_GET['page'];#Detect which page called and handle variables et$rs = @mysql_connect("localhost","******","******") or die("ERR:CONN"); $rs = @mysql_select_db("pages") or die("ERR:DB"); $sqlhead1 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $sqlmsg1 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $sqlhead2 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $sqlmsg2 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $rs = mysql_query($sqlhead1) or die(queryhead1); $head1 = Mysql_fetch_array($rs); $rs = mysql_query($sqlmsg1,$conn) or die(queryhead1); $msg1 = Mysql_fetch_array($rs); $rs = mysql_query($sqlhead2,$conn)or die(querymsg1); $head2 = Mysql_fetch_array($rs)or die(queryhead2); $rs = mysql_query($sqlmsg2,$conn)or die(querymsg2); $msg2 = Mysql_fetch_array($rs); [/code]im getting queryhead1 error message. Quote Link to comment https://forums.phpfreaks.com/topic/10054-mysql-content-selector-help-query/ Share on other sites More sharing options...
redarrow Posted May 20, 2006 Share Posted May 20, 2006 [code]#get page datafrom url$page = $_GET['page'];#Detect which page called and handle variables et$rs = mysql_connect("localhost","******","******") or die("ERR:CONN"); mysql_select_db("pages",$rs) or die("ERR:DB"); $sqlhead1 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $sqlmsg1 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $sqlhead2 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $sqlmsg2 = 'SELECT * FROM $page WHERE variable like \'head1\' LIMIT 0, 30 '; $rs = mysql_query($sqlhead1) or die(queryhead1); $head1 = Mysql_fetch_assoc($rs); $rs = mysql_query($sqlmsg1,$conn) or die(queryhead1); $msg1 = Mysql_fetch_assoc($rs); $rs = mysql_query($sqlhead2,$conn)or die(querymsg1); $head2 = Mysql_fetch_assoc($rs)or die(queryhead2); $rs = mysql_query($sqlmsg2,$conn)or die(querymsg2); $msg2 = Mysql_fetch_assoc($rs); [/code] Quote Link to comment https://forums.phpfreaks.com/topic/10054-mysql-content-selector-help-query/#findComment-37394 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.