Jump to content

brown2005

Members
  • Posts

    942
  • Joined

  • Last visited

Everything posted by brown2005

  1. spot on rich. thanks very much Regards Rich (lol)
  2. MySQL
  3. explain a bit more of what u are trying to do please.. i dont understand
  4. no i want to group by year so it is like 2002 - 5 2004 - 3 2006 - 3 and so on so it counts how many records there are for each year
  5. if i have $sql = "SELECT * FROM table1 GROUP BY year"; but i only have a date field in my table, so how can i get just the year from it
  6. u can have say index.php?page=1&id=1 $page = $_GET['page']; $id = $_GET['id']; hope this helps
  7. hi... i am setting a file that is for todays date.... $date = TODAYS DATE HERE ...... $date_month = TODAYS MONTH HERE ...... etc, etc, etc.... but i have totally forgot how to do it.... any help please..
  8. VARCHAR
  9. i want someone to enter results into a textarea like a b c d and then on the post script it will insert them into say table1 as separate entries..
  10. sorry i mean, how can i set the cookie if a check box is ticked..... that can be used with php sessions
  11. can u show me how to do it then please?
  12. Hi, Can I use both together.... i mean i have now login_process.php i have lines like $_SESSION['MemberID'] = $login_array['members_id']; session_register('MemberID'); and in session.php which calls all the information i have $session_sql = "SELECT * FROM members WHERE members_id = '$_SESSION[MemberID]'"; $session_result = mysql_query($session_sql) or die(mysql_error()); $session_array = mysql_fetch_array($session_result); $session_id = $session_array['members_id']; $session_member = $session_array['members_username']; now obviously when u close ur browser it deletes the session... but i want to know if i can have say a tick box on the login form which people can tick to stay logged in and set a cookie to be used with the above, or any better ideas... thanks
  13. well say its pulled a website from the database $w = $array['website_url']; and i want to be able to bookmark this address... is that the way u said above?
  14. <a href="javascript:bookmark('Website address goes here ....','Enter Your Title Here ....')";>Bookmark this Site</A> i would like this to be written in php and where it says Website address goes here i want http://$w
  15. THANKS sorrys bout the CAPS, thanks very much
  16. i want to show an ip address, but i cant remember wat it is?
  17. SQL-query :  SELECT * FROM websites WHERE websites_id NOT IN ( SELECT websites_hits_id FROM websites_hits ) LIMIT 0 , 30 MySQL said: #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 'SELECT websites_hits_id FROM websites_hits ) LIMIT 0, 30' at li
  18. $sql = "select * from table1 where members_id not in (select selected_id from table2 where 1)"; is this correct as i cant get it to work
  19. wat ya mean... can u show me?
  20. CREATE TABLE `members` (   `members_id` bigint(15) NOT NULL auto_increment,   PRIMARY KEY  (`members_id`) ) TYPE=MyISAM AUTO_INCREMENT=2 ; INSERT INTO `members` VALUES (1); CREATE TABLE `websites` (   `websites_id` bigint(15) NOT NULL auto_increment,   `websites_website` varchar(255) NOT NULL default '',   `websites_hits` bigint(15) NOT NULL default '0',   `websites_hits_unique` bigint(15) NOT NULL default '0',   `websites_date` datetime NOT NULL default '0000-00-00 00:00:00',   PRIMARY KEY  (`websites_id`) ) TYPE=MyISAM AUTO_INCREMENT=4 ; INSERT INTO `websites` VALUES (1, 'www.fanaticfootball.co.uk', 0, 3, '2006-08-25 09:53:53'); INSERT INTO `websites` VALUES (2, 'www.google.co.uk', 0, 3, '2006-08-25 09:54:03'); INSERT INTO `websites` VALUES (3, 'www.bbc.co.uk/sport', 0, 2, '2006-08-25 09:54:10'); CREATE TABLE `websites_hits` (   `websites_hits_id` varchar(15) NOT NULL default '0',   `websites_hits_user` bigint(15) NOT NULL default '0',   `websites_hits_website` bigint(15) NOT NULL default '0' ) TYPE=MyISAM; INSERT INTO `websites_hits` VALUES ('1 1', 1, 1);    
  21. Like this; Hi, member 1, You have not viewed the following websites:- www.test.co.uk www.notatest.co.uk so basically i want to select all the tables from websites that have no hits for member 1 in websites_hits.
  22. say i have member_id is 1 i want to select all websites from table websites, for member 1, which have no hits in websites_hits
  23. Hi, I have three tables [b]members[/b] members_id [b]websites[/b] websites_id [b]websites_hits[/b] websites_hits_id rite in the website_hits table the websites_hits_id is 'members_id websites_id' so wat i want to do is select all the websites from table websites that have no hits (websites_hits) for the member.............
×
×
  • 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.