1. Weird

    Date: 10/05/06 (MySQL Communtiy)    Keywords: mysql, sql, web, hosting

    My current contractor has a number of websites that were developed by a whole lot of different people. Because of the NDA, I can't cut & paste the code involved, but has anyone heard of a Error # 30 when using MyIsam tables on a 4.1.x MySql server? I've ransacked the documentation trying to figure out what caused this because the current solution offered by the hosting company is unacceptable.

    Some more specifics... the error was with a UPDATE that took a field value and set it to myField = myField + 1; It's been bothering me because I have the mysql source code and I've tried walking through the code to figure out where this phantom error code came from.

    Source: http://community.livejournal.com/mysql/104322.html

  2. Some help on approaching CMS systems

    Date: 10/05/06 (PHP Development)    Keywords: cms, php, mysql, css, html, sql, web

    I am looking for some opinions on how to best approach creating a web site with a CMS system.

    I was originally thinking of implementing various bits of code freely available online and then merging them to play nicely together as one for a client of mine but came across some rather unique-looking packages on the web. One of these packages is Typo3, although I have some concerns about it.

    Typo3 seems to be amazing in the sense that it literally "has it all"--guestbooks, galleries, tracking, comments, CMS, easy editors, etc.--but this is also what worries me. As a web designer and developer, I adhere to strict XHTML/CSS standards and to the separation of content and representation for web design. My concern is that as a huge monolithic package, it looks terribly susceptable to some terrible, broken HTML and design-procedures that would be near impossible to fix.

    I have also come across CMS Made Simple but haven't had much of an opportunity to delve into it. It is very likely to suffer from these same things, although I do not think, from memory, that it was as full blown a project.

    Now keep in mind, I am a much stronger designer than developer but I am quite able to dive into code and hack and adjust things as needed as I have experience in PHP, MySQL, and the like. Does anyone have any experience with these packages or others like them? Would it make more sense for me to develop an entire system from scratch or by piecing smaller works together?

    Any recommendations or opinions would be very much appreciated.

    PS. If this was a due-by-next-week thing, it would be a no-brainer. The client wants this done ASAP, but not necessarily so fast as to comprimise quality.

    Source: http://community.livejournal.com/php_dev/72753.html

  3. ээнкапсуляция, мать её так :)

    Date: 10/06/06 (Code WTF)    Keywords: mysql, sql

    class banner_class extends mysql_class
    {
    	function test()
    	{
            ....  ....
            }
    }
    $result = new banner_class;
    $template = $result->test();
    
    
    готовый код, в функции 
    конструкции вида
    if ($_POST['foo'] == 'bar') {
    ...
    } ...
    {
    
    }
    

    Source: http://community.livejournal.com/code_wtf/54113.html

  4. On-the-fly PDFs.

    Date: 10/06/06 (PHP Community)    Keywords: php, mysql, sql, web, google

    My employer wants to start generating PDFs from our PHP management system. I'm still pretty new to really 'doing things' with PHP and the PDF documentation I looked at on the online manual lacks clarification on almost every command for it.

    I'm wondering if someone has an idea of where I can read something of substance on the subject. My google results turned up a few web design tutorials - but they are based on depreciated code.

    Specifically I need to learn how to open a PDF file as a template only with added data from form/mysql information.

    Source: http://community.livejournal.com/php/500859.html

  5. re-sort query results?

    Date: 10/10/06 (PHP Community)    Keywords: mysql, sql

    My brain is fried. I have a query that gets the last 5 items from a mysql table by ordering them in descending order and limiting them to 5 (ORDER BY ID DESC LIMIT = 5). But, I then need to display the results in ASC order.

    I am using some legacy code I am not entirely familiar with (the "$this->" operator), and I feel a little lost. Any ideas?

    Current code:
    $this->DBQuery("SELECT * FROM ".$this->table[3]." WHERE adate<='".$adate."' AND ".$sectionID." AND ".$priority." AND ".$authorID." AND status=1 ORDER BY ID DESC LIMIT ".$articlenumber);

    Source: http://community.livejournal.com/php/501510.html

  6. mysql_connect(...) - IP Vs. Socket

    Date: 10/11/06 (PHP Community)    Keywords: php, mysql, sql

    I haven't found much documentation on using a mysql socket 'localhost:/path/To/mysql.socket' versus just doing 'localhost' or 'myIP' when connecting to mysql using the php client library. Anyone know of any difference? I assume that sockets are more secure/faster because it doesn't have to go through the net stack just to communicate with a process that is on the same machine. But was curious if anyone knew.

    Source: http://community.livejournal.com/php/501894.html

  7. How To Use Vanilla Forum On MySQL Database Without Password Set

    Date: 10/23/06 (Java Web)    Keywords: mysql, database, sql

    First of all I want to make it clear that having a MySQL database without a password set (on your root account) is a very very bad idea. However I wanted to set it up on my home machine which has XAMPP installed. And XAMPP by default creates a root account for MySQL without any [...]

    Source: http://blog.taragana.com/index.php/archive/how-to-use-vanilla-forum-on-mysql-database-without-password-set/

  8. Auto delete records

    Date: 10/23/06 (MySQL Communtiy)    Keywords: mysql, sql

    I have a site where postings expire after 30 days. Whats the best way to automatically delete them from MySQL?

    Source: http://community.livejournal.com/mysql/104915.html

  9. Completely Lost

    Date: 10/24/06 (MySQL Communtiy)    Keywords: mysql, database, sql

    Hello. I am so glad I found this community. I am very new to MySQL & completely lost. I'm using it for a Database Fundamentals course that I'm taking. The instructor isn't teaching us the material...she's expecting us to learn from the textbooks. I'm finding this to be a subject that's hard to learn from books alone. An example of what I'm having a problem with:

    DROP TABLE IF EXISTS `book`;
    CREATE TABLE `book` (
    `BOOK_CODE` char(4) NOT NULL default '',
    `TITLE` char(40) default NULL,
    `PUBLISHER_CODE` char(3) default NULL,
    `TYPE` char(3) default NULL,
    `PRICE` decimal(4,2) default NULL,
    `PAPERBACK` char(1) default NULL,
    PRIMARY KEY (`BOOK_CODE`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    --
    -- Dumping data for table `henry`.`book`
    --

    /*!40000 ALTER TABLE `book` DISABLE KEYS */;
    INSERT INTO `book` (`BOOK_CODE`,`TITLE`,`PUBLISHER_CODE`,`TYPE`,`PRICE`,`PAPERBACK`) VALUES
    ('0180','A Deepness in the Sky','TB','SFI','7.19','Y'),
    ('0189','Magic Terror','FA','HOR','7.99','Y'),
    ('0200','The Stranger','VB','FIC','8.00','Y'),
    ('0280','Rumpole for the Defence','PE','MYS','7.19','Y'),
    ('0378','Venice','SS','ART','24.50','N'),
    ('0389','Concepts of Database Management','CT','CMP','43.99','Y'),
    ('079X','Second Wind','PU','MYS','24.95','N'),
    ('0808','The Edge','JP','MYS','6.99','Y'),
    ('1351','Dreamcatcher: A Novel','SC','HOR','19.60','N'),
    ('1382','Treasure Chests','TA','ART','24.46','N'),
    ('138X','Beloved','PL','FIC','12.95','Y'),
    ('1456','Truman','SS','HIS','29.90','Y'),
    ('2226','Harry Potter and the Prisoner of Azkaban','ST','SFI','13.96','N'),
    ('2281','Van Gogh and Gauguin','WP','ART','21.00','N'),
    ('2766','Of Mice and Men','PE','FIC','6.95','Y'),
    ('2908','Electric Light','FS','POE','14.00','N'),
    ('3350','Group: Six People in Search of a Life','BP','PSY','10.40','Y'),
    ('3743','Nine Stories','LB','FIC','5.99','Y');
    INSERT INTO `book` (`BOOK_CODE`,`TITLE`,`PUBLISHER_CODE`,`TYPE`,`PRICE`,`PAPERBACK`) VALUES
    ('3906','The Soul of a New Machine','BY','SCI','11.16','Y'),
    ('5163','Travels with Charley','PE','TRA','7.95','Y'),
    ('5790','Catch-22','SC','FIC','12.00','Y'),
    ('6128','Jazz','PL','FIC','12.95','Y'),
    ('6328','Band of Brothers','TO','HIS','9.60','Y'),
    ('669X','A Guide to SQL','CT','CMP','37.95','Y'),
    ('6908','Franny and Zooey','LB','FIC','5.99','Y'),
    ('7405','East of Eden','PE','FIC','12.95','Y'),
    ('7443','Harry Potter and the Goblet of Fire','ST','SFI','18.16','N'),
    ('7559','The Fall','VB','FIC','8.00','Y'),
    ('8092','Godel, Escher, Bach','BA','PHI','14.00','Y'),
    ('8720','When Rabbit Howls','JP','PSY','6.29','Y'),
    ('9611','Black House','RH','HOR','18.81','N'),
    ('9627','Song of Solomon','PL','FIC','14.00','Y'),
    ('9701','The Grapes of Wrath','PE','FIC','13.00','Y'),
    ('9882','Slay Ride','JP','MYS','6.99','Y'),
    ('9883','The Catcher in the Rye','LB','FIC','5.99','Y'),
    ('9931','To Kill a Mockingbird','HC','FIC','18.00','N');
    /*!40000 ALTER TABLE `book` ENABLE KEYS */;

    How do I put that in proper format in a database, so I can run & install it in a MySQL database? Or can I run it as is?
    Or are there any really simple resources that you could suggest, that might also offer some assistance?

    Thank you so much for the help!

    Source: http://community.livejournal.com/mysql/105012.html

  10. Need PHP/MySql/Joomla coder

    Date: 11/03/06 (Computer Geeks)    Keywords: php, mysql, html, sql, web

    I'm working on a Joomla web site project that will be getting national attention over the next two years (it is election-related, with a "test run" for the 2007 election, but the real fun will happen in 2008). I need to find a coder who can help create a Joomla component and module. We have designers for the layout, this is just the backend MySql coding and the front-end component/module code as well as HTML form code for interaction.

    As such, I need someone who can hit the ground running with MySql, PHP and understands or can quickly come up to speed with the coding model of Joomla.

    If this is you and you'd be interested in working on a high-profile project that will get much national attention, a load of traffic, likely become a reasonably well-known meme, and also actually make some small difference in the screwed-up political process we have here in the United States, please let me know.

    Source: http://community.livejournal.com/computergeeks/996690.html

  11. String comparisons

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

    I can’t find this in the mysql manual, I’m working on some filters and one of the things that we need to do is to have relative string comparisons.

    When comparing strings is there any difference between > and >=? I tried both comparisons and they seemed to return the same result sets.

    Thanks

    Source: http://community.livejournal.com/mysql/105911.html

  12. Remote DB backup

    Date: 11/09/06 (MySQL Communtiy)    Keywords: mysql, sql

    Right now were doing backup's by hand because the last developer lied and said he had a working backup system. So instead of trying to figure out what he tried to do, my senior and I decided to start from scratch. Connection between the machines is handled with ssh pub/priv key and keychain so the local script doesn't have a problem connecting securely.

    Untested but the plan is to have a cron script connect to the remote and run mysqldump. The backup DB account only has select privileges so one of the idea's was to put the password in my.cnf. IS there a better way then this?

    Source: http://community.livejournal.com/mysql/106193.html

  13. holy crap @ adodb

    Date: 11/11/06 (PHP Community)    Keywords: mysql, technology, sql

    i'm just starting to learn the beauty of adodb. freaking hella saved lines of unnecessarily repeated code.

    $sql = "SELECT * FROM $dbname.accounts WHERE id = '".$_COOKIE["account_id"]."'";
    $result = $__db->Execute($sql);
    $account_name = $result->fields["name"];
    $account_prestige = $result->fields["prestige"];
    $account_rank = $result->fields["rank"];
    $account_kills = $result->fields["kills"];

    replaced:

    $account_query = "SELECT * FROM $dbname.accounts WHERE id = '".$_COOKIE["account_id"]."'";
    $account_result = mysql_query($account_query, $connection) or die("Error getting account data: [" . mysql_error() . "]");
    $account_row = mysql_fetch_array($account_result);
    $account_name = $account_row["name"];
    $account_prestige = $account_row["prestige"];
    $account_rank = $account_row["rank"];
    $account_kills = $account_row["kills"];

    horray for coding technology! time to dance!

    Source: http://community.livejournal.com/php/509542.html

  14. Books, PHP, and OOP.

    Date: 11/16/06 (PHP Community)    Keywords: php, programming, mysql, database, sql, web

    So I wanted an opinion on some books. I consider myself very well... dumb, in PHP. I can write simple backends to manage website content, upload files, screw with databases... but while loops, for statements, classes... they scare me.

    In an effort to expand my knowledge of PHP I recently purchased two books:

    Web Database Applications with PHP and MySQL (2nd Edition) by O'Reilly
    Object-Oriented PHP: Concepts, Techniques, and Code by Peter Lavin

    And the only purpose of this post is to see if any of you have opinions on these books, or suggestions for what I could do to begin obtaining a more robust handle on PHP programming. Because honestly... I'd rather code PHP than design another club flyer.

    Source: http://community.livejournal.com/php/510766.html

  15. Нужен толковый программист PHP

    Date: 11/16/06 (PHP Development)    Keywords: cms, php, mysql, html, xml, sql, java, web

    Други, срочно требуется web-программист.
    Санкт-Петербург.
    От 1000 (по результатам собеседования).

    Требования:
    * PHP5 (понимание отличий между 4.x/5.0/5.1/5.2 будет большим плюсом)
    * Понимание и умение применять ООП (знание "основных паттернов" будет 
    плюсом)
    * Опыт работы с MySQL 5 или хорошее понимание реляционной модели 
    (если вас не пугают слова "триггер" и "хранимая процедура", то это 
    будет плюсом)

    Желательно:
    * JavaScript (JSON)
    * Subversion
    * XML-DOM, HTML-DOM
    * Навыки работы в Unix-консоли

    Если вы умеете что-то "сверх" и думаете что это может быть нам 
    интересно — упоминайте в резюме :)
    Примеры кода в резюме — это полезно

    О работе у нас:

    В компании есть своя CMS. Основную часть времени программисты должны 
    будут дописывать её и заниматься оптимизацией процесса deploying'а 
    сайтов на ней. Подключением сайтов, в основном, занимаются 
    верстальщики и отнимать у них хлеб, соискателей никто не просит :)
    Кроме того, в компании регулярно случаются заказы на кастомные 
    решения. При решении таких задач понадобиться иннициатива и знания 
    широкого профиля :)

    Пишите: aleks на  molinos точка ru  или  ICQ 95912480

    Source: http://community.livejournal.com/php_dev/73825.html

  16. Web Project

    Date: 11/16/06 (WebDesign)    Keywords: php, mysql, sql, java, web, hosting

    Hello, everyone. I recently acquired a web project that I am, unfortunately, unable to do. It requires some PHP/MySQL and Javascript knowledge that is a little over my head. I was wondering if anyone here would like to either help me with this project, or take it on completely. The company is based in Dallas.



    My website is www.thecablepro.com and we recently had a PHP upgrade by
    our hosting company. Unfortunately some of the calculations for pricing
    were upset by this and are not functional. There is also a number
    showing up on some of the pages directly above the left upper corner of
    the "cost per additional foot" box on the cables themselves. It seems
    the way money amounts are displayed in the sale section is not correct
    either. The amounts are showing up with only one numeral after the
    decimal point.


    If anyone is interested, please let me know by commenting. Thank you.

    Note: I apologize in advance if this is not allowed.

    Source: http://community.livejournal.com/webdesign/1187771.html

  17. problem with adodb

    Date: 11/19/06 (PHP Community)    Keywords: php, mysql, database, sql

    Hi. I'm not really completely sure as to why this is happening. Here's my error message:

    Fatal error: Call to a member function Execute() on a non-object in /opt/lampp/htdocs/medievalbattles/current/v8/httpdocs/include/functions.php on line 16

    Here's the functions.php line (the whole function, really). Line 16 is $result = $__db->Execute($sql);
    ----------
    // Does this email exist already?
    function checkemail($email)
    {
        global $dbname;
        $sql = "SELECT * FROM $dbname.accounts WHERE email = '$email'";
        $result = $__db->Execute($sql);
        if ($result->RecordCount >= 1)
        {
            $uid = $result->fields["id"];
            return $uid;
        }
        else
            return false;
    }
    ----------

    At the top of functions.php, I am including my config file (include("config.php");)

    The contents of config.php are as follows:
    ----------
    #####################
    ## Database variables
    #####################
    $dbhost = "localhost";
    $dbuser = "root";
    $dbpass = "";
    $dbname = "mb_game";

    /*
    * ADOdb Lite v1.30
    * http://adodblite.sourceforge.net/index.php
    */
    require_once("/opt/lampp/htdocs/medievalbattles/current/v8/httpdocs/adodb/adodb.inc.php");

    $__db = ADONewConnection($dbtype);
    $__db->debug = false;
    $__db->Connect($dbhost, $dbuser, $dbpass);
    ----------

    Any idea as to why I'm getting this error?

    (PHP v5.1.4 - MySQL v5.0.21)

    Source: http://community.livejournal.com/php/512496.html

  18. New to PEAR

    Date: 11/22/06 (PHP Development)    Keywords: php, mysql, software, sql, apache

    Hi all

    am Pretty new to using PEAR, facing some pbms here lately ,
    I ve installed pear with the following setup : windows /apache 2/mysql /php5
    now while execute the following code :



    I am getting the following error :

    "Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pear.php on line 3

    Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='C:\PHP\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pear.php on line 3"

    please let me know how to fix this.thx alot.
    Praveen.

    Source: http://community.livejournal.com/php_dev/74476.html

  19. mysql_affected_rows error

    Date: 11/22/06 (PHP Community)    Keywords: mysql, database, sql

    ETA: Solved with the help of '[info]'nickinuse.

    Hi guys, I'm trying to make an email verification script.
    1. User enters values to the contact form (done)
    2. Contact form sends verification email to the entered user email (done)
    3. User clicks on the link and verification process is complete (I'm stuck here)



    // 1. open connection to MySQL (okay, done!)
    $koneksi = mysql_connect($db_host, $db_user, $db_password) or die(mysql_error());
    $db_select = mysql_select_db($db_name) or die(mysql_error());

    // 2. query the database to see if the verification string match the ones in the database (this is okay, too!)
    $query = "SELECT email_id FROM email_ver WHERE verify_string=$verify";
    $result = mysql_query($query);
    while ( $data = mysql_fetch_array($result) )
    { $drid = $data['email_id']; }
    if ($drid!=$id)
    { $t="There are no such ID or request."; }
    else {
    // 3. query the database to update that email has been verified (this is where I'm stuck!)
    $query = "UPDATE email_ver SET email_verify='y', verify_string='0' WHERE email_id=$id";
    // specifically these next two lines!
    $result = mysql_query($query) or die(mysql_error());
    $num_rows = mysql_affected_rows($result);
    // if the query work
    if ($num_rows > 0) { echo "Yay! Your email is valid!"; }
    }


    I got this following error:
    Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource

    Why is that happen? When the actual query is successfully done in the database (I've checked and re-checked). [Edit: It's because I'm feeding it with the wrong kind of resource. *LOL*]

    Thanks!

    Source: http://community.livejournal.com/php/513516.html

  20. New to PEAR

    Date: 11/22/06 (PHP Community)    Keywords: php, mysql, software, sql, apache

    Hi all

    am Pretty new to using PEAR, facing some pbms here lately ,
    I ve installed pear with the following setup : windows /apache 2/mysql /php5
    now while execute the following code :


    require_once('DB.php');

    $db_host='localhost';

    $db_database='somedb';

    $db_username='someuser';

    $db_password='somepwd';

    $query='select * from employee';

    $dsn = "mysql://$db_username:$db_password@@db_host/$db_database";

    /$db = DB::connect($dsn);

    ?>

    I am getting the following error :

    "Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pear.php on line 3

    Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='C:\PHP\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pear.php on line 3"

    please let me know how to fix this.thx alot.
    Praveen.

    Source: http://community.livejournal.com/php/513026.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