Jump to content

Hamlets666

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Posts posted by Hamlets666

  1. 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.

     

     

     

  2. 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...

  3. 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
  4. 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]
  5. [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...  :-\
  6. [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]
  7. $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?
  8. [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?
×
×
  • 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.