1. galleries!

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

    so, my quest for the perfect gallery continues. my question to you all is this: what gallery applications do you use and what do you think of them? I prefer php and no need for mysql, but I'm open to other options. the only thing I'm adamant about is not using javascript. ;)


    x-posted to '[info]'webdesign and '[info]'webdev.

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

  2. AD help...

    Date: 03/10/05 (IT Professionals)    Keywords: database, sql

    OK, I am not an AD specialist, far from it.  However, it is falling to me to do some user creation and maintenance as I have the ability to script from the SQL database and perform mass operations.

    I have been looking for an answer to this for a bit and cannot find any info that explains the behavior that I am seeing.

    When I add accounts with a DSADD command, the displaynam shows as the logon name and not the value I specify in the -display attribute.  The Display Name field is populated and shows up corectly, both in the GUI and with DSGET USER [name] -display.

    I can right click in the MMC and rename the user, but that defeats the automation a bit.

    Is there something I am missing?

    Thanks in advance.

    X-Posted: '[info]'computergeeks and '[info]'itprofessionals

    Source: http://www.livejournal.com/community/itprofessionals/6540.html

  3. php4 class extending and shared variables

    Date: 03/11/05 (PHP Community)    Keywords: php, mysql, database, sql

    I have a base class in which I'd like to extend. The thing is, the base class connects to a database. How can I make it so any classes I extend from base class will share the one connection to the database and not make a duplicate connection for each object i make?

    example:

    class base {
     var $connection;
     function base(){
      $this->connection = mysql_connection("server","user","password");
      mysql_select_db("database",$this->connection);
     }
     function exec($query){
      return mysql_query($query,$this->connection);
     }
    }
    
    class child extends base {
     var $foo;
     var $bar;
     function child(){
      $this->foo = mysql_result($this->exec("select foo from foobar"),0);
     }
    }
    


    I'd like it so no matter how many objects i make of the child class, they all share the same database connection. I think in PHP5 you can do something like "shared $connection" but i'm using php4.

    tia

    -ryan

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

  4. pdf to database?

    Date: 03/11/05 (Asp Dot Net)    Keywords: sql

    Does anyone how to store a .pdf file into a sql table as a binary?
    THANKS

    Source: http://www.livejournal.com/community/aspdotnet/28550.html

  5. Relevancy and Context in Web Pages with CSS2 and PHP

    Date: 03/12/05 (Web Development)    Keywords: php, browser, css, html, sql, web

    Hi all. This will be my first post to the community, so before anything I'd just like to say how educational its been reading your posts all this time. Now then, here's my contribution.

    I've recently been playing with what I think is an interesting technique for adding relevancy and context to my pages. Basically, I embed a small, invisible message within the HTML of a page or within the link to that page which is only visible to people who follow special links. This enables me to embed certain so-called "relevancy messages" on the destination page of a link that helps keep visitors oriented when browsing through my site. (This is exceptionally beneficial when back-linking to old blog posts!)

    A much more detailed explanation of what I'm talking about is on my site. A brief explanation of what I first did is this:


    1. When I write links that reference my old pages, I go back to those old pages and insert a named anchor (or tag the element with an id to reference in my link with a fragment identifier).

    2. I add a title to that element so I can hide it within the HTML for visitors who browse normally, but show it to visitors who follow links to that fragment.

    3. I've added a style rule in my pages to display that title text before the fragment only for visitors who follow the special links, specifically, *:target::before { content: attr(title); }



    (See an example in action on my test pages.)

    This means when visitors click on a link to a fragment within a page, they see a clear, short message explaining its relevance. Especially on long pages where my link only references a small part of it, this is an enormous enhancement to usability because it ensures a smooth transition of context between one page and the next. Coupled with helpful title text on the source link itself, it can help create an extremely smooth yet still unobtrusive browsing experience.

    As an extension and major enhancement, I've also been experimenting with "dynamic relevancy messages" as a sort of mini-API to allow anyone to include their own relevancy message into my pages when they link to me. The crux of this technique uses a variable within a GET query-string to plug into the above CSS content-before rule.

    So what do you think about this technique? Useless? Great? Superfluous? All feedback welcome.

    I'd be especially interested to hear from web accessibility gurus who can test the accessibility of this technique and PHP gurus who can help break my site by using XSS attacks for the dynamically generated CSS rule. As I'm somewhat of a novice in that area (that is XSS in the context of CSS, since it's usually an HTML/SQL thing), I'd appreciate it if you can help me fortify my defenses against what is potentially a very obvious attack vector on my site now.

    Thanks for your time. :)

    (Oh yeah, and, um, you gotta use Firefox or another CSS2-compliant browser such as Safari, or a recent version of Netscape, or Mozilla in order for the CSS to work, obviously. It won't work with any version of Internet Explorer or Opera. Sorry.)

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

  6. Noob question...

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

    the timediff functions and others witihn mysql... is that only available for max db? and is maxdb the paid version?

    I'm just making sure my simple sql syntax is not wrong.

    thanks in advance.

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

  7. Just another AIM question.

    Date: 03/14/05 (Computer Geeks)    Keywords: database, sql

    Well, no.

    I'm actually interested in hearing your definitions or seeing good examples of SQL. I'm a bit uncertain of what it is. The best I could do is, "SQL is a database creation and modification program."

    Think you could toss me a bone, here?

    Source: http://www.livejournal.com/community/computergeeks/634697.html

  8. Newbie question

    Date: 03/15/05 (MySQL Communtiy)    Keywords: sql

    Hi everyone, I just joined, I think I have a simple question but my brain has frozen and is having difficulty remembering my SQL lessons from university a few years back...

    I have 2 tables - Student and Unit, Student lists all name and contact details, Unit lists all subjects each student is studying. Each ONE student has MANY units and each ONE unit has MANY students. How can I perform a query that lists ALL units being studied by EACH student?

    as in:

    Student 12345 Units ABC123, DEF321, HIJ567

    Student 45678 Units TUV654, DEF321, MNO321

    I've been trying variations of GROUP BY and HAVING, to no avail...

    Thanks in advance! Carla

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

  9. 3 Tier Web development and Code Generation

    Date: 03/15/05 (Web Development)    Keywords: php, mysql, html, database, sql, java, web

    This is long so a cut tag...

    So recently I’ve been working on some new stuff. In recent versions of Mozilla (including Firefox) there is now a SOAP client. This means that a web application can access the server at any time, and not just when the page loads. This means a huge amount of flexibility is now available to the developer in a DHTML application. I have been playing with this for several months and realized that a large amount of the code is very repetitive.

    I am working on a application to build these applications. I have a DHTML page which lets you model your application. It pulls table and index definitions from a MySQL database, and then it lets you set up validation rules for each field, set up custom SQL queries (In addition to a number of automatically generated ones), set field labels, and change other things about the data model.




    So far I can auto generate
    * DHTML Forms
    * Javascript glue for the forms
    * Javascript to wrap the soap functions into simple javascript methods.
    * PHP classes to access a mysql database
    * A wrapper to serve the PHP classes up as SOAP.

    Still to do

    * Data validation
    * Unit test frameworks
    * Installer scripts for a generated application

    For more information see my wiki
    I plan to have the code on source forge (project “xulbuilder”) today or tomorrow

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

  10. Timestamping and datetime

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

    I'm working on a database table and am having trouble getting the dates added properly. I want two date fields, one to store the date the record was created, the other to store the date it was last modified. However, I can't figure out how to get the fields to hold anything but a bunch of zeros. I've tried TIMESTAMP and DATETIME and using the PHP time function and reading through the mysql.com documentation and am still in the dark. Any help would be appreciated.

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

  11. PHP and J2EE: connection's pool

    Date: 03/16/05 (PHP Community)    Keywords: php, mysql, sql, java

    Does anybody read about creating MySql connection's pool in PHP like in Java2EE. I have read a LOT about mysql_connect and mysql_pconnect but no one word about pools.

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

  12. Converting MYSQL timestamps?

    Date: 03/16/05 (PHP Community)    Keywords: php, mysql, database, sql

    I have a timestamp in my MySQL database. I grab the information along with the other table information using a select, then want to display it in my PHP pages. However, everything I've tried turns up really funny displays. Is there a way in PHP to format MySQL timestamps?

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

  13. What a Day...

    Date: 03/16/05 (PHP Community)    Keywords: php, sql

    Now, code I use all the time for news is creating a new entry correctly, but also creating a blank entry? Ideas?

    Here is the code...

    add_content.php
    confirm_content.php
    noc_news.sql

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

  14. displaying Japanese from mysql with php?

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

    Hi, thanks in advance for any advice.

    I am working on a website on my PC, and I don't know anything about servers but I wanted to develop locally, so I am using a WAMP package. I would like the site to be able to display database entries from mysql that are in Japanese, but when I call them I just see question marks instead of the Japanese (using various browsers and encoding options). I can, however, just echo Japanese text in the php file and it will display properly. Also, in phpmyadmin where I am creating the database the Japanese is displaying correctly.

    I don't know if it's a problem with the server, mysql, or the script, so I don't even know where to start. I have tried it with the db, table and fields collated in both sjis_japanese_ci and utf8_unicode_ci, with the same results.

    Does anyone know what the problem could be? Thanks!

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

  15. Pear::DB Woes

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

    I'm trying to connect to a PostgreSQL database on a system that only allows unix socket connections. The DNS I'm trying is below, but no joy so far. I've verified that I can connect to the database on the commandline with 'psql'.

    $db = DB::connect('pgsql://username:password@unix(/tmp/.s.PGSQL.5432)/database');

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

  16. New to MySQL

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

    Alright, so I'm a bit new to MySQL. I haven't had to work with databases much, and when I have done them, it was with Access (Ick!). Anyway, i've got a php page that I'm trying to connect to a MySQL database. This isn't how the data's going to be displayed, obviously, but I'm unsure where to go from here.


    // Connecting, selecting database
    $connect = mysql_connect('localhost', 'mannsye', 'nickmann1169');
    if (!$connect)
    die('Could not connect: ' . mysql_error());
    else
    echo "Connected successfully

    ";

    $category = 1;

    mysql_select_db("mannsye_conigeninformation") or die("Could not select database");

    // Performing SQL query
    $query = "SELECT * FROM residental_links, residental_types ";
    $query += "WHERE ((residental_links.section)=(residental_types.type)) ";

    $query += "ORDER BY residental_types.index, residental_links.name;";
    $result = mysql_query($query) or die('Query failed: ' . mysql_error());
    // Free resultset
    mysql_free_result($result);

    // Closing connection
    mysql_close($connect);
    ?>


    I've got my query seperated from the code, but as I know very little about MySQL, I don't know if the syntax is correct or not.


    SELECT * FROM residental_links, residental_types
    WHERE ((residental_links.section)=(residental_types.type))
    ORDER BY residental_types.index, residental_links.name;


    Whenever I try and access the database and the tables, I can connect, but I can't display any data.



    Connected successfully

    Query failed: 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 '0' at line 1



    Please, any help would be appreciated.

    Many thanks!
    --Lisa

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

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

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

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

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

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