Jump to content

Hamlets666

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by Hamlets666

  1. Is it imposible to create a preview (image) of video, i would like to show a 5th second of clip. Is that imposible with php?
  2. Here is the code: SELECT f.*, p.post_time, p.post_username, u.username, u.user_id FROM (( " . FORUMS_TABLE . " f LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id) LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id) Thing I want to add is a check, i want to select data from all those tables there gothic_forum_id is equal to $gf : WHERE f.gothic_forum_id = $gf AND p.gothic_forum_id = $gf AND u.gothic_forum_id = $gf Where shuld write it? I tried some ways and goth sql error.
  3. [b]to[/b] is BIGINT, [b]txt[/b] - TEXT, [b]type[/b] is TEXT Look`s ok for me!
  4. Hie  ;) [code]$ins = "INSERT INTO msg(to, txt, type)values('$cid', '$newtxts', '1')";[/code] Error : [i]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 'to, txt, type)values('1', 'Building motorfactoryRUS is done', '1[/i] When I "print" query it look`s so : [i]INSERT INTO msg(to, txt, type)values('1', 'Building motorfactoryRUS is done', '1')[/i] Can`t get a point what`s wrong...
  5. Omg, where are you all super programmers?
  6. Hey guys ;) Could you help me with this one: imagine there is a folder secret with many subfolders and subsubfolders and.... I need to edit all files (  str_replace("was so", "is now", $fileweread);  )
  7. So there is a long text. For example: [i]Lol [xc] pop [lo][/i] I want to get in array txt which is between [ and ] Like $arr[0] would be xc and $arr[1] would be lo. I hope you understand  ;)
  8. wildteen88, It`s alive  ;) Thanks...
  9. also tried str_replace("_", "666", $gfa); gfa - Muzyka/MP3/Zarubezhnye/N/Nightwish/Nightwish666-666Wish666I666Had666an666Angel.mp3 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 'load WHERE `fname` = 'Muzyka/MP3/Zarubezhnye/N/Nightwish/Nightwish666-666Wish666' at line 1[/b] So "_" isn`t reason of error
  10. Now $gfa is Muzyka/MP3/Zarubezhnye/N/Nightwish/Nightwish\_-\_Wish\_I\_Had\_an\_Angel.mp3 But still the same : [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 'load WHERE `fname` = 'Muzyka/MP3/Zarubezhnye/N/Nightwish/Nightwish\_-\_Wish\_I\_' at line 1[/b]
  11. [code]$sql2 = "SELECT COUNT(*) FROM load WHERE `fname` = '$gfa' "; $result2 = mysql_query($sql2) or die(mysql_error()); $num2 = mysql_result($result2, 0);[/code] 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 'load WHERE `fname` = 'Muzyka/MP3/Zarubezhnye/N/Nightwish/Nightwish_-_Wish_I_Had_' at line 1[/b] $gfa is /Muzyka/MP3/Zarubezhnye/N/Nightwish/Nightwish_-_Wish_I_Had_an_Angel.mp3 What`s wrong ? I do not get a point...  :-\
  12. This code : [code]$path = "pic"; $x = count(glob($path."/*")); [/code] gives me number of files in that folder. How to count files also in subfolders(make total count of files)?
  13. [code]$onlinesave="INSERT INTO store(opis, owner, moneybuy, wepa1, wepa2, wepa3, wepa4, wepa5, wepa1m, wepa2m, wepa3m, wepa4m, wepa5m, cara1, cara2, cara3, cara4, cara5, cara1m, cara2m, cara3m, cara4m, cara5m)values('$opis', '$owner', '$moneybuy, '$wepa1', '$wepa2', '$wepa3', '$wepa4', '$wepa5', '$wepa1m', '$wepa2m', '$wepa3m', '$wepa4m', '$wepa5m', '$cara1', '$cara2', '$cara3', '$cara4', '$cara5', '$cara1m', '$cara2m', '$cara3m', '$cara4m', '$cara5m')"; mysql_query($onlinesave) or die(mysql_error());[/code] and result : [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 'LOL', '666', '666', '666', '666', '666', '666', '666', '666', '666', '666', '666' at line 1[/b] DUMP: [code]CREATE TABLE `store` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `opis` TEXT NOT NULL , `owner` TEXT NOT NULL , `moneybuy` BIGINT NOT NULL , `wepa1` TEXT NOT NULL , `wepa2` TEXT NOT NULL , `wepa3` TEXT NOT NULL , `wepa4` TEXT NOT NULL , `wepa5` TEXT NOT NULL , `wepa1m` BIGINT NOT NULL , `wepa2m` BIGINT NOT NULL , `wepa3m` BIGINT NOT NULL , `wepa4m` BIGINT NOT NULL , `wepa5m` BIGINT NOT NULL , `cara1` TEXT NOT NULL , `cara2` TEXT NOT NULL , `cara3` TEXT NOT NULL , `cara4` TEXT NOT NULL , `cara5` TEXT NOT NULL , `cara1m` BIGINT NOT NULL , `cara2m` BIGINT NOT NULL , `cara3m` BIGINT NOT NULL , `cara4m` BIGINT NOT NULL , `cara5m` BIGINT NOT NULL , PRIMARY KEY ( `id` ) );[/code] Varuables: [quote]opis - LOL owner - dyzaster moneybuy - 12 wepa1 - LOL wepa2 - 666 wepa3 - 666 wepa4 - 666 wepa5 - 666 wepa1m - 666 wepa2m - 666 wepa3m - 666 wepa4m - 666 wepa5m - 666 cara1 - 666 cara2 - 666 cara3 - 666 cara4 - 666 cara5 - 666 cara1m - 666 cara2m - 666 cara3m - 666 cara4m - 666 cara5m - 666[/quote]
  14. $feedme="UPDATE users SET read='$newread' WHERE name='$name'"; mysql_query($feedme) or die(mysql_error()); [b]Error:[/b] [i]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 'read='1' WHERE name='Dyzaster'' at line 1[/i] [b]Table:[/b] [i]CREATE TABLE `users` ( `id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TEXT NOT NULL , `pass` TEXT NOT NULL , `mail` TEXT NOT NULL , `about` TEXT NOT NULL , `read` BIGINT NOT NULL ) ENGINE = MYISAM ;[/i] What`s wrong?
  15. They can be gif, only if it will make them smaller  :) Quality can be very bad it would be o.k  ;D
  16. [code]$neww=40; $newh=40; list(, , $type,)=@getimagesize($file); if ($type==1) {$funci="imagecreatefromgif";} //$funco="imagegif";} if ($type==2) {$funci="imagecreatefromjpeg";} //$funco="imagejpeg";} $im1 = @$funci($file); $im2=@ImageCreate($neww,$newh); @imagecopyresized($im2, $im1, 0,0,0,0,$neww,$newh, @imagesx($im1), @imagesy($im1)); @header("Content-type: image/png"); @imagepng($im2);[/code] It`s code which changes image size(pixels), but after this image size(kb) is still too big for me, so are there any ideas, how could I change quality of image?
  17. [code] $name = "test"; if(!preg_match("[a-z]", $name)) { echo "BAD"; } else { echo "GOOD"; } [/code] But is show`s [b]BAD[/b], am I doing something wrong?
  18. Stupid question : How to get random letter (a-z) in to varuable $x ?
  19. It there such a function? [b][i]Please, do not offer regular expresions.[/i][/b]
  20. [code]<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.phpfreaks.com/index.php">[/code] Put it between between the <HEAD> and </HEAD>.
  21. I have a array "world" and i`m tired of wroting $world['***'], so I was thinking could I get varuables look like this $***, using foreach?
  22. You can not use header location if you print something before/after sending header. Use html redirect!
  23. Daniel0, ok :) Look`s like it worked ;) But how about if $url = bla.com/folder/?666 how to send this ?666 with get ? Will it work if write just $url = bla.com/folder/?666 ? How do you all think?
×
×
  • 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.