Jump to content

adamdidthis

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

adamdidthis's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OK have sorted that but its now doing : Problem with the query:<pre>INSERT INTO jos_content (title, title_alis, introtext, fulltext, state, sectionid, mask, catid, created, created_by, created_by_alis, modified, modified_by, checked_out, checked_out_time, publish_up, publish_down, images, urls, attribs, version, parent_id, ordering, metakey, metadesc, access, hits) VALUES      ('Line up', '', '', '<p><img height="38" hspace="0" src="images/stories/88986284dECkQq_ph.jpeg></p>', '1', '3', '0', '10', '2003-10-23 07:17:12', '14', '', '2003-10-23 21:50:47',  '14', '0', '', '', '', '', '','allowcomments=0 showcomments=0', '1', '0', '0', '', '', '', '0')</pre><br>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 'fulltext, state, sectionid, mask, catid, created, created_by, created_by_alis, m' at line 1[
  2. am now getting PHP Parse error:  parse error, unexpected $ in /home/adamdidthis/journalimport.php on line 18
  3. In what way are they wrong? I have tried different combinations of qoutes but can't seem to work it out. Any help will be greatly appreciated Cheers
  4. Where am I going wrong with this: [code]mysql_connect("localhost","root","")or die(mysql_error); mysql_select_db("joomla")or die(mysql_error); $result1 = mysql_query("SELECT * FROM pn_v4b_journal_journal")or die(mysql_error); while($row = mysql_fetch_array($result1)or die(mysql_error)){ if (isset($row['jjo_image'])){ $message = "<p><img height=\"38\" hspace=\"0\" src=\"images/stories/".$row['jjo_image']."></p>"; }else{ $message = $row['bodytext']; } $result2 = mysql_query("INSERT INTO jos_content (title, title_alis, introtext, fulltext, state, sectionid, mask, catid, created, created_by, created_by_alis, modified, modified_by, checked_out, checked_out_time, publish_up, publish_down, images, urls, attribs, version, parent_id, ordering, metakey, metadesc, access, hits) VALUES ("$row['jjo_title']","","","$message","1","3","0","10","$row['jjo_cr_date']","$row['jjo_owner_uid']","","$row['jjo_lu_date']","$row['jjo_lu_uid']","0","","","","","","allowcomments=0 showcomments=0","1","0","0","","","","0")")or die(mysql_error); }[/code] I keep getting: Parse error: parse error, unexpected T_VARIABLE in on line 17
  5. I have the following query: [code]$sql2=$dbconn->SelectLimit($test = "SELECT u.user_id, u.username, u.user_lastvisit, u.user_regdate, u.user_aim, u.user_yim, u.user_msnm, u.user_email, u.user_viewemail, $postplace, u.user_rank, u.user_from, u.user_occ, u.user_interests, u.user_avatar, u.user_avatar_type FROM $pntable[phpbb_users] AS u LEFT JOIN $pntable[phpbb_posts] p ON u.user_id=p.poster_i d GROUP BY u.user_id ORDER BY $order DESC", 1);[/code] And would like to make it so that it only returns a result if there is something in the u.user_avater column. So I have tried this: [code]$sql2=$dbconn->SelectLimit($test = "SELECT u.user_id, u.username, u.user_lastvisit, u.user_regdate, u.user_aim, u.user_yim, u.user_msnm, u.user_email, u.user_viewemail, $postplace, u.user_rank, u.user_from, u.user_occ, u.user_interests, u.user_avatar, u.user_avatar_type FROM $pntable[phpbb_users] AS u LEFT JOIN $pntable[phpbb_posts] p ON u.user_id=p.poster_i d WHERE u.user_avatar != "" GROUP BY u.user_id ORDER BY $order DESC", 1);[/code] But it still doesn't work, any idea whats wrong?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.