mobious
Members-
Content Count
117 -
Joined
-
Last visited
Everything posted by mobious
-
what i meant was that if the mysql server was on a remote server then you can use PHP to connect to it and execute queries. but if it is hosted on a local server and you have access to it then you can just type the query in the shell(interpreter) of the server.
-
if your are using mysql through php then you will be executing the queries through the function mysql_query(). otherwise if you are using it directly inside a shell or command prompt in your own system then you should enter the mysql shell then execute the query directly.
-
Ranking System With Mysql Cant think of a way to do it.
mobious replied to krap's topic in Programming
use this query: SELECT creator, (crew1 + crew2 + crew3 + crew4 + crew5 + crew6 + crew7 + crew8 + crew9 + crew10) as score FROM crews -
what do you mean by installing queries? could you rephrase your post?
-
Writing To Database Problem With Mysql - Not Writing Forum Post
mobious replied to beeseven's topic in Programming
no prob! -
Writing To Database Problem With Mysql - Not Writing Forum Post
mobious replied to beeseven's topic in Programming
i tested your srcipt by using my own database and substituted a fixed value for $imsg and $postedby. it worked for me so i am really wondering now what happened. -
i really think that the problem is in the mysql_query() function. is $db your connection id to mysql? like you used it like $db = mysql_conect()? so why not do the query like this? if ever there is an error in the query, surely it will be shown completely. function displayNews($all = 0) { global $db, $max_items; if ($all == 0) { $query = "SELECT id, title, newstext, date_format(postdate, \'%Y-%m-%d\') as date FROM news ORDER BY postdate DESC LIMIT $max_items"; } else { $query = "SELECT id, title, newstext, date_format(postdate, \'%Y-%m-%d\') as date FROM news ORDER BY postdate DESC"; } if (!($result = mysql_query($query, $db))) { exit('MySQL Query Error: ' . mysql_error() . ' | SQL Query: ' . $query . ' | Line: ' . __LINE__); } while ($row = mysql_fetch_assoc($result)) { $date = $row['date']; $title = htmlentities($row['title']); $news = nl2br(strip_tags($row['newstext'], '<a><b><i><u>')); echo "<table border=\"1\" width=\"300\" align=\"center\">\n"; echo "<TR><TD><b>$title</b> posted on $date</td></tr>\n"; echo "<TR><TD>$news</td></tr>\n"; $comment_query = "SELECT count(*) FROM news_comments WHERE news_id={$row['id']}"; if (!($comment_result = mysql_query($query, $db))) { exit('MySQL Query Error: ' . mysql_error() . ' | SQL Query: ' . $comment_query . ' | Line: ' . __LINE__); } $comment_row = mysql_fetch_row($comment_result); echo "<TR><TD><a href=\"{$_server['php_self']}"."?action=show&id={$row['id']}\">Comments</a>"."($comment_row[0]}</td></tr>\n"; echo "</table>\n"; echo "<br>\n"; } if ($all == 0 ) { echo "<a href=\"{$_server['php_self']}?action=all\">View all news</a>\n"; }}
-
I created the program for everyone. it uses the GNU GPL license. if you wanna try it out, go to http://forums.xisto.com/no_longer_exists/. You cannot really learn the whole of PHP in a short span of time. maybe the basics but not the whole language. try grabbing the PHP Manual at http://php.net/. Then use editors such as dreamweaver or crimson. then upload them to your host all the time or just setup your own webserver with PHP support so that you can test your scripts locally.
-
i would like to suggest that you make sure that your sql queries are correct. that error usually shows up when the function mysql_query() return a value of false which is not a valid resource. this happens because of errors in sql queries.
-
yes, you would block all the users that connect to the said proxies that is listed on the free proxy list.
-
just create a php script the can access the database. then make flash generate requests from it. then script will process the request and output url encoded string that flash can understand.i hope that's the answer that you need.
-
i think md5 hashing is standard way of security. the password is different from the inputed one because md5() calculates the md5 hash of the string using the md5 algorithm. so the returned value is a unique 32-character hexadecimal number. so when comparing the the stored password during login, you should hash the password again then comapare.
-
so they really have no support at all. too bad.
-
not really. it happens because when you start to print out html tags, it is already sent to the browser. it is a rule that you can only change html header if there are no output yet sent to the browser.
-
if you have not seen it then maybe they really dont have a forum. so if they don't have a forum try to email them using their support address if they have...
-
session_start() MUST be always on the very top of each script. before any ouput is sent to the output buffer.also php warnings and notices etc. sometime gives output without you knowing it. try setting the error_reporting to none.
-
i think they have a forum. try your luck there.
-
well just a thought... why don't you guys make use of template systems? so that your code will be easy to understand because it get rid of all tags in the script. it's also much efficient.
-
Misc Cool Scprits Im looking for some cool scripts
mobious replied to Joshthegreat's topic in Programming
you miss the point of that script. the purpose of that method of linking is that you can add a function that will called before all pages will be parsed and sent to the output buffer.