buat apa yach?
bukannya kita ngomongin 'linux-programming' nih,
ada sich, basic di linux tapi bukan visual basic

saran:
belajar dulu php, pahami.
kalo udah baru di convert ke bahasa program laen yg kamu bisa.
gimana? :D



> ada yg bisa bantu translate fungsi php ini ke dalam bentuk basic ato
> visual
> basic ???
>
> fungsi ini diambil dari phpmyadmin... mohon amat sangat bantuannya...
>
>
> ''''''start code'''''''''
>     FUNCTION PMA_splitSqlFile(&$ret, $sql, $release)
>     {
>         $sql          = Trim($sql);
>         $sql_len      = strlen($sql);
>         $char         = '';
>         $string_start = '';
>         $in_string    = FALSE;
>         $time0        = Time();
>
>         FOR ($i = 0; $i < $sql_len; ++$i) {
>             $char = $sql[$i];
>
>             // We are IN a String, check FOR NOT escaped END of strings
> except
> FOR
>             // backquotes that can't be escaped
>             IF ($in_string) {
>                 FOR (;;) {
>                     $i         = strpos($sql, $string_start, $i);
>                     // No END of String found -> add the current substring
> TO
> the
>                     // returned Array
>                     IF (!$i) {
>                         $ret[] = $sql;
>                         RETURN TRUE;
>                     }
>                     // Backquotes OR no backslashes before quotes: it's
> indeed
> the
>                     // END of the String -> EXIT the LOOP
>                     ELSE IF ($string_start == '`' || $sql[$i-1] != '\\') {
>                         $string_start      = '';
>                         $in_string         = FALSE;
>                         BREAK;
>                     }
>                     // one OR more Backslashes before the presumed END of
> String...
>                     ELSE {
>                         // ... first checks FOR escaped backslashes
>                         $j                     = 2;
>                         $escaped_backslash     = FALSE;
>                         WHILE ($i-$j > 0 && $sql[$i-$j] == '\\') {
>                             $escaped_backslash = !$escaped_backslash;
>                             $j++;
>                         }
>                         // ... if escaped backslashes: it's really the end
> of
> the
>                         // String -> EXIT the LOOP
>                         IF ($escaped_backslash) {
>                             $string_start  = '';
>                             $in_string     = FALSE;
>                             BREAK;
>                         }
>                         // ... else LOOP
>                         ELSE {
>                             $i++;
>                         }
>                     } // END IF...elseif...else
>                 } // END FOR
>             } // END IF (IN String)
>
>             // We are NOT IN a String, first check FOR delimiter...
>             ELSE IF ($char == ';') {
>                 // IF delimiter found, add the parsed part TO the returned
> Array
>                 $ret[]      = substr($sql, 0, $i);
>                 $sql        = LTrim(substr($sql, Min($i + 1, $sql_len)));
>                 $sql_len    = strlen($sql);
>                 IF ($sql_len) {
>                     $i      = -1;
>                 } ELSE {
>                     // The submited statement(s) end(s) here
>                     RETURN TRUE;
>                 }
>             } // END ELSE IF (IS delimiter)
>
>             // ... then check FOR start of a String,...
>             ELSE IF (($char == '"') || ($char == '\'') || ($char == '`'))
> {
>                 $in_string    = TRUE;
>                 $string_start = $char;
>             } // END ELSE IF (IS start of String)
>
>             // ... for start of a comment (AND remove this comment IF
> found)...
>             ELSE IF ($char == '#'
>                      || ($char == ' ' && $i > 1 && $sql[$i-2] . $sql[$i-1]
> ==
> '--')) {
>                 // starting position of the comment depends on the comment
> type
>                 $start_of_comment = (($sql[$i] == '#') ? $i : $i-2);
>                 // IF no "\n" exits IN the remaining String, checks FOR
> "\r"
>                 // (Mac eol style)
>                 $end_of_comment   = (strpos(' ' . $sql, "\012", $i+2))
>                                   ? strpos(' ' . $sql, "\012", $i+2)
>                                   : strpos(' ' . $sql, "\015", $i+2);
>                 IF (!$end_of_comment) {
>                     // no eol found after '#', add the parsed part to the
> returned
>                     // Array IF required AND EXIT
>                     IF ($start_of_comment > 0) {
>                         $ret[]    = Trim(substr($sql, 0,
> $start_of_comment));
>                     }
>                     RETURN TRUE;
>                 } ELSE {
>                     $sql          = substr($sql, 0, $start_of_comment)
>                                   . ltrim(substr($sql, $end_of_comment));
>                     $sql_len      = strlen($sql);
>                     $i--;
>                 } // END IF...else
>             } // END ELSE IF (IS comment)
>
>             // ... and FINALLY disactivate the "/*!...*/" syntax IF MySQL
> <
> 3.22.07
>             ELSE IF ($release < 32270
>                      && ($char == '!' && $i > 1  && $sql[$i-2] .
> $sql[$i-1] ==
> '/*')) {
>                 $sql[$i] = ' ';
>             } // END ELSE IF
>
>             // loic1: send a fake header EACH 30 sec. to bypass browser
> timeout
>             $time1     = Time();
>             IF ($time1 >= $time0 + 30) {
>                 $time0 = $time1;
>                 header('X-pmaPing: Pong');
>             } // END IF
>         } // END FOR
>
>         // add any rest TO the returned Array
>         IF (!empty($sql) && ereg('[^[:space:]]+', $sql)) {
>             $ret[] = $sql;
>         }
>
>         RETURN TRUE;
>     } // END of the 'PMA_splitSqlFile()' function
> '''''''end of code'''''''''''''''
>
>
> --
> Berhenti langganan: [EMAIL PROTECTED]
> Arsip dan info: http://linux.or.id/milis.php
>
>


-- 
Berhenti langganan: [EMAIL PROTECTED]
Arsip dan info: http://linux.or.id/milis.php

Kirim email ke