1. Clean fields?

    Date: 03/17/05 (PHP Community)    Keywords: mysql, sql

    I'm working on a form that will input information into a MySQL. I want to make sure that I don't get any malicious code allowed in the forms. Does anyone have good resources on sterilizing form information?

    TIA!

    Source: http://www.livejournal.com/community/php/274636.html

  2. mysql help... anyone have any insight?

    Date: 03/18/05 (MySQL Communtiy)    Keywords: php, mysql, xml, sql

    i finally installed php5 as a cgi on my server because the server company has not upgraded to php5 yet. PHP5 runs only in 1 specific directory.(.htaccess file) Php appears to work fine as php5 but now i can't get it to read the mysql db.

    the mysql library is compiled and i don't get an error when the connection string is called. the results from the query just doesn't appear. I'm definite it's not the php code because I haven't altered the code.

    Anyone have any idea as to why? -Thank you all in advance!


    here is the php code: maybe something changed w/ php5?
    $sql="SELECT categoryid, category FROM t_category ORDER BY category ASC";
    $result=$this->f_selectquery($sql);
    foreach ($result as $key => $value) {
    echo " \n";
    }

    here is the configure command.
    './configure' '--prefix=/home/acctname/php' '--enable-force-cgi-redirect' '--with-xml' '--with-libxml-dir=/home/acctname/php/lib' '--enable-soap' '--with-xsl=/home/acctname/php/lib' '--with-mysql=/home/acctname/php/lib' '--with-curl=/home/acctname/php/lib' '--with-mhash-dir=/home/acctname/php/lib' '--with-mcrypt-dir=/home/acctname/php/lib' '--with-zlib-dir=/home/acctname/php/lib' '--with-jpeg-dir=/usr/' '--with-png-dir=/usr/' '--with-gd' '--enable-gd-native-ttf' '--enable-ftp' '--enable-sockets' '--enable-wddx' '--with-iconv' '--enable-soap'


    here are the mysql properties under php
    MySQL Support enabled
    Active Persistent Links 0
    Active Links 0
    Client API version 4.1.8
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/run/mysqld/mysqld.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib -lmysqlclient

    Directive Local Value Master Value
    mysql.allow_persistent On On
    mysql.connect_timeout 60 60
    mysql.default_host no value no value
    mysql.default_password no value no value
    mysql.default_port no value no value
    mysql.default_socket no value no value
    mysql.default_user no value no value
    mysql.max_links Unlimited Unlimited
    mysql.max_persistent Unlimited Unlimited
    mysql.trace_mode Off Off

    Source: http://www.livejournal.com/community/mysql/51286.html

  3. Pagination problem

    Date: 03/19/05 (PHP Community)    Keywords: mysql, sql

    Anyone know of any good pagaination functions - I've tried to code my own and I seem to be going around in cicles. What I've writen is:-



    function disp_page($offset, $max_rows, $table, $base_url)
    {
    	
    	mysql_select_db(DB);
    
    	if(!isset($offset))
    	{
    		$offset=0;
    	}
    	
    	$offset=($offset+$max_rows);
    	
    	// Define the SQL calls
    
    	$sql="select * from $table limit $offset, $max_rows";
    	$sql_tmp="select * from $table";
    	
    	// Make the SQL calls
    	
    	$result=mysql_db_query(DB, $sql);
    	$tmp=mysql_db_query(DB, $sql_tmp);
    	$total_rows=@mysql_num_rows($tmp);
    
    	// Define other variables
    	
    	$total_pages=(ceil($total_rows/$max_rows));
    
    	paginate($offset, $total_rows, $base_url, $max_rows, $total_pages);
    	
    	// Display the results
    	
    	while($row=@mysql_fetch_row($result))
    	{
    		disp_row($row);
    	}
    	echo"$ltbr>";
    	
    	paginate($offset, $total_rows, $base_url, $max_rows, $total_pages);
    	
    }
    
    function paginate($offset, $total_rows, $base_url, $max_rows, $total_pages)
    {
    	
    
    		// PREV link
    	if($offset > 0)
    	{
    		disp_prev($limit, $base_url, $max_rows);
    	}
    	
    		// Page Numbers
    	if($total_pages > 1)
    	{
    	//	disp_page_nums($offset, $base_url, $total_pages, $max_rows);
    	}
    		
    		// Next link
    	if(($offset + $max_rows) < $total_rows)
    	{
    		disp_next($offset, $base_url, $total_rows, $max_rows);	
    	}
    	
    		// Empty Results set 
    	if($total_rows==0)
    	{
    		echo"$ltbr>$ltcenter>No Records to Display$lt/center>

    "; } } function disp_row($row) { // This function is to be edited to display the data how needed echo"$lta href=\"?disp_t=topic&topic_id={$row[0]}\">".$row[2]."$lt/a>$ltbr>"; } function disp_prev($offset, $base_url, $max_rows) { $tmp_offset=($offset-$max_rows); if($tmp_offset $lt 0) { $tmp_offset = 0; } $offset=$tmp_offset; $url=$base_url."&offset=".$offset; echo"$lta href=".$url.">PREV$lt/a> "; } function disp_next($offset, $base_url, $total_rows, $max_rows) { $tmp_offset=($offset + $max_rows); // echo"$ltp>tmp_offset=$tmp_offset
    offset=$offset

    "; if($tmp_offset > $total_rows) { // Nothing Happening Here } else { $offset=$tmp_offset; $url=$base_url."&offset=".$offset; echo"$lta href=".$url.">NEXT$lt/a>$ltp>"; } } function disp_page_nums($offset, $base_url, $total_pages, $max_rows) { $page=(($max_rows/$offset)+1); for($i=1;$i<$total_pages;$i+1) { if($i==$page) { echo "$ltfont size=\"-1\">[".$i."] $lt/font>"; } else { $tmp_offset=($i * $max_rows); $offset=$tmp_offset; $url=$base_url."&offset=".$offset; echo"<a href=".$url.">PREV</a>"; } } }



    my main issue seems to be that the function disp_page_nums() seems to hang my server up.

    Any help or sugestions would be very welcome

    Paul

    Source: http://www.livejournal.com/community/php/275374.html

  4. Community promotion

    Date: 03/20/05 (PHP Community)    Keywords: php, mysql, sql, web

    Hi all, lurker here and whatnot.

    I just created a LJ-community for the discussion of the phpBB messageboards: '[info]'phpbb

    (if comunity promos such as this aren't allowed here, feel free to delete)
    cross-posted: '[info]'webmasterguild, '[info]'php, '[info]'mysql

    Source: http://www.livejournal.com/community/php/276223.html

  5. Community promotion

    Date: 03/20/05 (MySQL Communtiy)    Keywords: php, mysql, sql, web

    Hi all, lurker here and whatnot.

    I just created a LJ-community for the discussion of the phpBB messageboards: '[info]'phpbb

    (if comunity promos such as this aren't allowed here, feel free to delete)
    cross-posted: '[info]'webmasterguild, '[info]'php, '[info]'mysql

    Source: http://www.livejournal.com/community/mysql/51677.html

  6. Noob.

    Date: 03/25/05 (SQL Server)    Keywords: mysql, database, sql

    I'm used to working with MySQL and I have to make this forray into SQL server. So, I need a quick bit of help.

    I need to be able to browse through a database one record at a time. For that, I guess I need a way to give my query a start row and. I can end it just fine. What should I use? And how do I figure out what row I am currently on. With MySQL theres the LIMIT clause and I know thats not available in SQL server.

    Thanks in advance.

    Source: http://www.livejournal.com/community/sqlserver/22596.html

  7. Chat Room Setup

    Date: 03/25/05 (MySQL Communtiy)    Keywords: php, mysql, browser, database, sql

    I'm trying to create a PHP browser-based chat room application. It will include Savant, JPSpan, and a custom MySQL wrapper class. The server is running PHP 4.3.10 and MySQL 4.0.18-standard. Now that the background information is out of the way, to the real issue at hand...

    I obviously want the application to be able to support as many users as the server will allow. That said, the application must be as efficient as possible in terms of the database design and implementation. The database will be relational in design. There will be tables for rooms, users, and posts made by users to rooms. The application will also include a feature to allow users to search posts. My plan at the moment is to use a HEAP table as a buffer for current posts, given that they provide a speed advantage because they exist in memory and use hash indexing. On some sort of timed interval, posts would be moved from the HEAP table to a separate permanent table for archived posts.

    However, this approach would require that posts be archived regularly over the course of the day. The more frequently posts are archived, the smaller the number of posts that could potentially be lost due to a server crash, power less, etc. The HEAP table really only needs to hold posts long enough for them to propagate to users. I'm not certain what frequency would be best.

    Also, because HEAP tables don't support the TEXT field type, the HEAP table would initially need a VARCHAR(255) field for the post body. The application would have to check the length of posts when users submit them and then ALTER the table to add additional VARCHAR(255) fields, split the post body up to store it across those fields, and then concatenate the value of those fields to display the post. Since displaying each post would require getting all fields in the table anyway, it should be fairly easy for the application to figure out with each display how many fields it needs to concatenate to display the post body.

    Any input? Any alternative approaches? I probably neglected to mention some tenant of my application requirements, so if you have questions, please ask, and I'll most certainly answer them. I think I've covered most of the bases, though. HEAP tables are a new concept to me, so I'm mostly lingering in the world of hypotheses before I actually try to make this work.

    Source: http://www.livejournal.com/community/mysql/52183.html

  8. Script Help

    Date: 03/25/05 (PHP Development)    Keywords: php, mysql, browser, sql, web

    Hi, I do not know how to code PHP, but I do know how to impliment PHP scripts. I've been looking for a GPL one that does the following:

    Forces download (header script that forces the "save" dialog. I'm serving mp4s and I want to make sure they don't load in the browser).

    Anti-Leech (hides the true URL of my mp4s, and allows only referring servers I've entered into the script to download, otherwise people are redirected to the page of my choice)

    Download Counter (either flat files or MySQL).

    And that's it. I found scripts that do bits and pieces of this, but only one that does it all—and you have to pay for it (you can actually use it for free but it appends the site's name to the downloaded files unless you register the pro version). This script is called "Download Center Lite" and can be found at www.Stadtaus.com. I tried to crack it, but they've done clever things in the script to prevent that.

    Also, I've found "Download Centers" that do much of these, but that's just for having a specific page with download links. I want to be able to dynamically call to these mp4 links from various pages on my website, not just from one.

    Ideas?

    This message was also posted in the LJ community "PHP."

    Source: http://www.livejournal.com/community/php_dev/53455.html

  9. Script help

    Date: 03/25/05 (PHP Community)    Keywords: php, mysql, browser, sql, web

    Hi, I do not know how to code PHP, but I do know how to impliment PHP scripts. I've been looking for a GPL one that does the following:

    Forces download (header script that forces the "save" dialog. I'm serving mp4s and I want to make sure they don't load in the browser).

    Anti-Leech (hides the true URL of my mp4s, and allows only referring servers I've entered into the script to download, otherwise people are redirected to the page of my choice)

    Download Counter (either flat files or MySQL).

    And that's it. I found scripts that do bits and pieces of this, but only one that does it all—and you have to pay for it (you can actually use it for free but it appends the site's name to the downloaded files unless you register the pro version). This script is called "Download Center Lite" and can be found at www.Stadtaus.com. I tried to crack it, but they've done clever things in the script to prevent that.

    Also, I've found "Download Centers" that do much of these, but that's just for having a specific page with download links. I want to be able to dynamically call to these mp4 links from various pages on my website, not just from one.

    Ideas?

    Source: http://www.livejournal.com/community/php/277137.html

  10. recurrent question

    Date: 03/28/05 (PHP Community)    Keywords: php, mysql, sql, web

    i'm looking for a good webhost company to host my website. what are your recomendations?

    my needs are pretty standard.

    - php (5 would be nice)
    - mysql
    - ftp
    - email
    - subdomains
    - +200mbs space
    - +20gbs bandwith
    - CPanel, URCHIN statistics are a plus
    - if possible, ssh access. :)

    so far, and based on my past experience, i'm set on using eyow.com. but i want to hear what you guys recommend.

    (sorry if there is a list somewhere of recommended webhosts. i've searched the lj communities and nothing has come up.)


    crossposted to '[info]'webdev , '[info]'php , '[info]'mysql

    Source: http://www.livejournal.com/community/php/277786.html

  11. recurrent question

    Date: 03/28/05 (MySQL Communtiy)    Keywords: php, mysql, sql, web

    i'm looking for a good webhost company to host my website. what are your recomendations?

    my needs are pretty standard.

    - php (5 would be nice)
    - mysql
    - ftp
    - email
    - subdomains
    - +200mbs space
    - +20gbs bandwith
    - CPanel, URCHIN statistics are a plus
    - if possible, ssh access. :)

    so far, and based on my past experience, i'm set on using eyow.com. but i want to hear what you guys recommend.

    (sorry if there is a list somewhere of recommended webhosts. i've searched the lj communities and nothing has come up.)


    crossposted to '[info]'webdev , '[info]'php , '[info]'mysql

    Source: http://www.livejournal.com/community/mysql/52298.html

  12. recurrent question

    Date: 03/28/05 (Web Development)    Keywords: php, mysql, sql, web

    i'm looking for a good webhost company to host my website. what are your recomendations?

    my needs are pretty standard.

    - php (5 would be nice)
    - mysql
    - ftp
    - email
    - subdomains
    - +200mbs space
    - +20gbs bandwith
    - CPanel, URCHIN statistics are a plus
    - if possible, ssh access. :)

    so far, and based on my past experience, i'm set on using eyow.com. but i want to hear what you guys recommend.

    (sorry if there is a list somewhere of recommended webhosts. i've searched the lj communities and nothing has come up.)


    crossposted to '[info]'webdev , '[info]'php , '[info]'mysql

    Source: http://www.livejournal.com/community/webdev/183770.html

  13. sad question for the brainy peeps ~

    Date: 03/30/05 (MySQL Communtiy)    Keywords: php, mysql, database, sql

    hi all ~ i have a vB board out there in cyberland and it's got a "random quote" hack (the UQH by kurafire) ~

    anyway, after three years of smooth sailing, it recently developed some kvetchy sickness and i can't figure out the problem.

    this is the error message:

    Database error in vBulletin 2.3.0:

    Invalid SQL: SELECT *
    FROM quotes
    WHERE 1=1 AND mod!='N'
    ORDER BY letter,name ASC
    LIMIT 0,30
    mysql error: 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 '!='N'
    ORDER BY letter,name ASC


    mysql error number: 1064

    Date: Tuesday 29th of March 2005 07:20:54 PM
    Script: http://www.lookingland.com/board/board/quotelist.php?s=


    where it says "script" ~ that URL is completely wrong and i'm not sure where it's trying to call it from ~ (don't know if that's part of the problem? is that in a template?)

    anyway, i'm a complete dummitz about mysql ~ do you think i should just delete the table and rehack the whole thing? (please say no ~ hahahahaha) ~

    anyway, sorry if this is obnoxious. any hints would be very much appreciated.

    : o (

    Source: http://www.livejournal.com/community/mysql/53159.html

  14. Open source bundling

    Date: 03/31/05 (Open Source)    Keywords: php, mysql, database, sql, web, apache

    Open source bundling is the new trend. Martin Lamonica's story yesterday about SourceLabs describes one such bundles. Most are aimed at businesses. Many, like the SourceLabs bundle, are AMP Stacks, with the Apache Web Server, MySQL database, and PHP scripting tools. The idea is for a company to give ...

    Source: http://blogs.zdnet.com/open-source/index.php?p=215&part=rss&tag=feed&subj=zdblog

  15. Security

    Date: 04/01/05 (PHP Community)    Keywords: mysql, html, sql

    I’m working on some code and I am trying to make sure all the incoming data is secure. I currently call mysql_real_escape_string()
    on all incoming data, but I am wondering if it would be worth my while to call htmlspecialchars() on it as well. Does anyone else have any good tips on un-tainting user data.

    Source: http://www.livejournal.com/community/php/279632.html

  16. MySQL - Selecting based upon the value of a single Bit

    Date: 04/05/05 (PHP Community)    Keywords: mysql, sql

    Hi,

    Does anyone know if its possible to do something like:-

    SELECT * FROM $table if(query_bit(flags, 2))

    in a MySQL call.

    Thanks


    Pual

    Source: http://www.livejournal.com/community/php/279904.html

  17. PHP: Simple FAQ Script

    Date: 04/06/05 (Web Development)    Keywords: php, mysql, sql

    Hello
    Yesterday I started work on a small FAQ or help system, made with PHP, mod_rewrite, and MySQL
    I really just starting to learn MySQL and I thought that this would be a good place to start.
    I have not started on the Style yet,

    Demo: http://lj.funvill.com/help/
    Source: http://lj.funvill.com/help/source/

    Tell me what you think.
    Anything suggestions comments?

    Source: http://www.livejournal.com/community/webdev/186580.html

  18. Reading server load

    Date: 04/11/05 (MySQL Communtiy)    Keywords: mysql, sql

    I've finally put together a code-based load balancing scheme for distributing server load to a pool of slaves. The issue I'm up against now is a way to poll the slaves to see which has the lowest load, and there doesn't seems to be a standard simple MySQL command to report that.

    I'd like to keep the methods confined to SQL commands that can be executed via remote connections. The only option I can see at the moment is do "show processlist" and filter it to see the number of currently executing queries and get the average execution time, though that seems to be a bit "heavy".

    I haven't seen anything in show status or the like that shows something as basic as server load.

    I'm sure this has been covered before but I haven't been able to find any references. Any ideas?

    Source: http://www.livejournal.com/community/mysql/53451.html

  19. Query help

    Date: 04/13/05 (MySQL Communtiy)    Keywords: mysql, sql

    SELECT * from schedule WHERE (clientid = 95145) AND (date BETWEEN '2005-04-10' AND '2005-04-30') ORDER BY date

    Any one know of a good site with a elaborate description of the WHERE clause of the SELECT statement? I am trying to select data that matches a client id and a date range. The MySQL manual doesn't seem to get into it in detail.

    I got it to work. I had left out the quotes. Sheesh.

    Source: http://www.livejournal.com/community/mysql/54122.html

  20. Webhosting

    Date: 04/15/05 (PHP Community)    Keywords: php, mysql, sql, web

    Anyone know any good cheap webhosts for the uk?

    With features like PHP and MySQL included in the package of course.

    Source: http://www.livejournal.com/community/php/286063.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home