Jump to content

Roee

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Roee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Roee

    date/week

    exactly thanks alot
  2. Roee

    date/week

    hello, I have a date which's format is: week-year For example, today is: 30-2010 which means that we're on the 30th week on 2010 How do I found the bounds of that week? For the 30th week in 2010, the bounds are: July 25 to July 31 THANKS ROEE~!
  3. Hi I have the following SQL QUERY: $sql = "SELECT DISTINCT tbl1.*, tbl2.* FROM tbl1, tbl2 WHERE tbl1.active='0' AND tbl2.userID='".$me['id']."' AND (tbl1.site1ID = tbl2.siteID OR tbl1.site2ID = tbl2.siteID) ORDER BY tbl2.success DESC LIMIT 10"; The query workes well , but returns the results twice. I mean that if the results are: result1,result2,result3 I will get: result1 result1 result2 result2 result3 result3 Why is it happening? THANKS
  4. I tried something like this, and its work: preg_match_all('/{([1-9]),([1-9]),([1-9])}/', $string, $matches, PREG_SET_ORDER); but how do I change the [1-9] to something that will get 4-digit numbers and not only one digit numbers ? thank you
  5. You really don't like regular expressions, do you ? I really think the reg ex is better for me here, beacuse all these loops waste so much time for my site which contains so many results. So I still look for someone who'll show me how to do it with Reg Ex. Thanks!
  6. but not only the bits are delimited by a comma, they also contain commas in themselfs
  7. Hi, I have a row in my table (mysql) which contains something like this: How do I use reg exp to get an array of: $arr[0] = {1,1,1} $arr[1] = {2,2,2} $arr[2] = {3,3,3} $arr[3] = {4,4,4} ? And after getting this array, How do I split it to something like: $a[0][0] = 1 $a[0][1] = 1 $a[0][2] = 1 $a[1][0] = 2 $a[1][1] = 2 $a[1][2] = 2 $a[2][0] = 3 $a[2][1] = 3 $a[2][2] = 3 $a[3][0] = 4 $a[3][1] = 4 $a[3][2] = 4 Thank you very much Roee
  8. Hi, I've got complicated while trying to write the following mysq query. I hope you can help me to formulate it: I have a table which is called tbl1 and contains m_id, active, name Also I have another table which is called tbl2 and contains id, m_id I would like to find the rows from tbl2 which their m_id = m_id of the rows in tbl1, and in tbl1 these rows are active='0'. Moreover, I want to get the results with the less appearance, something like order by mysq_num_rows. How can I formulate this query? THANK YOU VERY MUCH ROEE
  9. i have a users system. each user have a control panel & control of his site. i want to make the site address of each user like his username, so if i get in to this address: http://www.domain.com/USER i will automatic transfer (by mod_rewrite) to: http://www.domain.com/members/USER thanks
  10. i want to get this addres: http://www.domain.com/USER and change USER to: /members/USERS http://www.domain.com/USER resolves to http://www.domain.com/members/USER how should i do it?
  11. hi i tried to write this: [code] $content = $_POST['content']; $match = array('#\[PHP\](.*?)\[\/PHP\]#se'); $replace = array("'<div style=\"margin:25px; margin-top:5px\"><div class=\"smallfont\" style=\"margin-bottom:2px\">PHP code:</div><div class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; overflow:auto\"><code style=\"white-space:nowrap\"><div dir=\"ltr\" style=\"text-align:left;\">'.highlight_string(stripslashes('$1'), true).'</div></code></div></div>'"); $content = preg_replace($match, $replace, $content);[/code] but if i try to write a " it makes mysql error: [b]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 '\' (ASCII=92) state=1[/b] why? thanks
  12. it doesnt work it is none it writes nothing
×
×
  • 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.