Jump to content

rostros

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rostros's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Okay quick fix managed to validate the code , if anybody is using Dreamweaver and you get the same problem just replace $queryString_tbl_dealer_vehicles = sprintf("&totalRows_tbl_dealer_vehicles=%d%s", $totalRows_tbl_dealer_vehicles, $queryString_tbl_dealer_vehicles); With Remove the &totalRows and replace it with "&" . totalRows_ $queryString_tbl_dealer_vehicles = sprintf("&" . "totalRows_tbl_dealer_vehicles=%d%s", $totalRows_tbl_dealer_vehicles, $queryString_tbl_dealer_vehicles);
  2. Hi Guys , having a little trouble getting this code through W3 XHTML Validation , Im using a Dreamweaver Pagination extension which I know using extensions is bad but this is a big project. Im familar with the concept of using & rather than & but it appears it still does't work. Anyway here is the code. - PHP Code / Variable $queryString_tbl_dealer_vehicles = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_tbl_dealer_vehicles") == false && stristr($param, "totalRows_tbl_dealer_vehicles") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_tbl_dealer_vehicles = "&" . htmlentities(implode("&", $newParams)); } } $queryString_tbl_dealer_vehicles = sprintf("&totalRows_tbl_dealer_vehicles=%d%s", $totalRows_tbl_dealer_vehicles, $queryString_tbl_dealer_vehicles); XHTML Page Code <?php for ($i=0; $i <= $totalPages_tbl_dealer_vehicles; $i++) { $TFM_PagesEndCount = $i + 1; if($i != $pageNum_tbl_dealer_vehicles) { printf('<a href="'."%s?pageNum_tbl_dealer_vehicles=%d%s", $currentPage, $i, $queryString_tbl_dealer_vehicles.'">'.$TFM_PagesEndCount."</a>"); }else{ echo(" [<strong>$TFM_PagesEndCount</strong>] "); } if($i != $totalPages_tbl_dealer_vehicles) echo(""); } ?> XHTML Error cannot generate system identifier for general entity "totalRows_tbl_dealer_vehicles" …x.php?pageNum_tbl_dealer_vehicles=1&totalRows_tbl_dealer_vehicles=8">2</a> -- It looks like the %s is the part where I need the & but this just gives more errors ? I hope someone can help me as I dont really want to code this site as non xhtml compliant. Thanks
  3. Hey Guys , having a little issue with a form submit which im hoping someone has the answer to, anyone who can help me solve this I will give $10 via paypal. I have been using Session Variables for sometimes in Dreamweaver, I dont really hand code that much to be honest, so thats why i need your help. I have quite a large form which has around 25 textfields, checkboxes and Drop Down fields etc, also mutiple file fields for photos, my current issue is that the user sometimes gets a Timeout when uploading the files, when the user uses the 'Back' button all data is lost. I know it is possible to store all information into session variables just when the user submits the form. I have looked at examples on this forum and the web but found only snipplets Okay....What I really need ! An Example of a basic session, storing the variables to the Server as soon as User has press Submit on the <FORM>, it wouldn't really matter about IF Statments to check if the session exist's, if you could so an example that would be great. $textfield $checkbox $dropdown Please note that I have one .php file and not both html / php files.
  4. Ok , thanks for your feedback. Ill have a play around.
  5. [quote author=fenway link=topic=102773.msg408502#msg408502 date=1154561794] Yes, but then you'd get a random filename! [/quote] Ok this is the table structure so far [b]phpbb_attachments [/b] [color=green]attach_id[/color] [color=teal]post_id [/color] [b]phpbb_attachments_desc[/b] [color=green]attach_id[/color] physical_filename [b]phpbb_posts[/b] [color=teal]post_id[/color] [color=blue]topic_id[/color] [b]phpbb_topics[/b] [color=blue]topic_id[/color] topic_filetime topic_attachment I Wish to Display all the topics with an attachment, with a single post_id , filetime also DESC to show the latest. From the above SQL i have been able to do this but I have mutiple post_id's because sometimes there is more than a couple of post's per topic. physical_filename      topic_id      post_id      topic_attachment  topic_filetime dscf_0045.jpg            5666          34444                  1                  (timestamp) Img0067.jpg              5667          35544                  1                (timestamp) , IF DISTINCT wont work would it be possible to create a function at end of the SQL like phpbb_post_id > 1 or something to always increment it somehow ?
  6. [quote author=fenway link=topic=102773.msg408430#msg408430 date=1154554541] You're right, you can't use DISTINCT for just one of N columns... however, if you use a GROUP BY (the proper way), you'll make any other column values from that table meaningless.  Please explain. [/quote] How the board works at the moment is a user can post mutiple posts to one topic, im trying to create a overview of posted topics, including the filename taken from the very first post of each topic (e.g a preview of whats been posted in that topic), hence thats why DISTINCT would of been great to remove all the duplicates post_ids .
  7. Okay, i am modding a phpbb database that has an attachment mod, i have had to connect 4 tables together which is the easy part, i have tried to use DISTINCT to remove duplicate post_id's but it doesn't work due to the number of tables im adding. here is my SQL Query SELECT phpbb_attachments_desc.attach_id, phpbb_attachments_desc.physical_filename, phpbb_attachments.attach_id, [color=red]phpbb_attachments.post_id[/color], phpbb_posts.post_id, phpbb_posts.topic_id, phpbb_topics.topic_id, phpbb_topics.forum_id, phpbb_topics.topic_time, phpbb_topics.topic_attachment FROM phpbb_attachments_desc, phpbb_attachments, phpbb_posts, phpbb_topics WHERE phpbb_attachments_desc.attach_id = phpbb_attachments.attach_id AND phpbb_attachments.post_id = phpbb_posts.post_id AND phpbb_posts.topic_id = phpbb_topics.topic_id  AND phpbb_topics.topic_attachment = 1 ORDER BY phpbb_topics.topic_time DESC What I Need is to remove these duplicate post_id's from the this query, as i want to show a preview of the attachment posted in the topic, please see attachment for screenshot. Any help would be great. thanks [attachment deleted by admin]
  8. Ive been using Dreamweaver for a while now and have been building dynamic sites with PHP / MySQL which is great fun but recently i have hit a break wall on a latest development. This is the current issue where im stuck , In one table which contains these details --------------------------------- vehicle_id vehicle_manufacturer vehicle_model vehicle_added ---------------------------------- On my .PHP Page I have created a Form, with a List Box and  created connection via MySQL to call all the Vehicles in this list. Problem : The List Box only contains either Manufacturer or Model Type not both at once, so I created another List Box in the Form so when the user selects the vehicle manufacturer it then filters the model dropdown box depending on the manufacturer. I know there is way of using javascript to filter the options on selection but i wish to use the options stored in MySQL. How do you program this Drop Down Box's that use MySQL Data, and how do you Filter them ? would you use $URL Variables or $FORM Variables or something different. Any help would be great.
×
×
  • 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.