Jump to content

aQ

Members
  • Posts

    66
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aQ's Achievements

Member

Member (2/5)

0

Reputation

  1. Is there any way to get info from more than one table at the time? I do it like this (php): mysql_query("SELECT * FROM users"); mysql_query("SELECT * FROM posts"); I am thinking of something like this: mysql_query("SELECT * FROM posts AND SELECT * FROM users");
  2. aQ

    Character sets

    Hello! I'm developing a website where I use some RSS data from an external source. The data comes in UTF-8-format. I get data from my database to find the RSS-feed I want. The problem is that the data from the database comes out like this: http://www.yr.no/sted/Norge/S�r-Tr�ndelag/Trondheim/Trondheim/varsel.xml. The �'s are æ's ø's and å's, all nordic special letters. How do I change the character set in MySQL (PhpMyAdmin). I have tried to change it under "Operations", where I changed it to "utf8_swedish_ci". Does anyone know what to do?
  3. aQ

    [SOLVED] Regexp help

    I finally fixed it using this line: #(http:\/\/www.yr.no\/stad\/Noreg\/[a-zA-Z0-9æøåÆØÅ]+\/[a-zA-Z0-9æøåÆØÅ]+\/[a-zA-Z0-9æøåÆØÅ]+\/varsel.xml)#
  4. Hello there! I'm trying to get some regexp working, but I haven't done this before, so I need some help. I have a text-document with a lot of links I want to get rid of. The syntax of the links are "http://www.yr.no/stad/Noreg/*SOMETHING*/*SOMETHING*/*SOMETHING*/varsel.xml". "*SOMETHING*" is different from link to link. The links does also contain Scandinavian letters like Æ Ø and Å (æ ø and å). At the moment, I've got this, but it doesn't work: $file = file_get_contents("viktigestader.txt"); $find = array("http:\/\/www.yr.no\/stad\/Noreg\/.+\/.+\/.+\/varsel.xml"); $replace = array(""); $done = preg_replace($find, $replace, $file); print $done; I hope you could help me out.
  5. Hi again! I've got a config.php file with some mysql-connection info etc. This file also contains the inclusion of my functions.php (containing all my functions). The index.php is starting with "include_once('config.php');" which I think also will include the functions file. Did that help?
  6. Hello! I've got a problem with one of my functions: Fatal error: Cannot redeclare checkuser() in /path/to/functions.php on line 5 Checkuser is used to check that the user is a real user. I haven't included it more than once, and the error doesn't display at every page-load, only sometimes. Does anyone know what this can be?
  7. aQ

    add \ to " and '

    Addslashes worked. Didn't see that you edited your post. Thank you.
  8. aQ

    add \ to " and '

    That will, as far as I can see, only make the html into < etc. I want the html to display as it is when the page shows, but still be able to add html to my pages using my cms.
  9. Hello! I am looking for a function (I know it exists, but I don't know it's name), that adds a \ in front of " and '. I want to do this, to let me post html codes in my home-made cms. Thank you.
  10. I'm making a new website now. I have two menus, a left menu (175px), and a right menu (200px). I want the content, which is in the middle, to automatically fit in between these two menus. "width: 100%-375px;" does not work... Any ideas?
  11. Hello! I'm trying to use MagpieRSS to get the new mails from my gmail account. I don't want my mail to be cached on my server (which will be a security issue), so I want to disable caching for that feed. I use the same Magpie for other feeds, which I would like to still cache. Is there a way I could do something like this: "$cache = 0" with magpie? Magpie can be downloaded from http://magpierss.sourceforge.net/. Thank you very much if you could help!
  12. I had put the array in "" like this: print "Value: $array[lala][value]"; When I removed the ""'s, it worked.
  13. It only echoes "[0]"... Any ideas?
  14. Hello! I have got an array. In this array, there are multiple arrays. I want to show some of the info in one of the arrays which are inside the main-array. It's like this: $array = Array( [test] => Test, [lala] => Array(with content in it).... ); I thought I just could say "print $array[lala][0];", and it would give me the first value of "lala" in the $array. This does not work, so how can I do it then? Thank you.
×
×
  • 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.