Re: cell colors PHP/MySQL
Brian E Boothe wrote: i'm needing assistance in table Cell color thru MySQL i have a project were im listing a projects in a table either Complete / Active / Pending / now im needing these refrances cells to change Color whenver its lists them out on a page, [Complete] = green[Active] = Blue[Pending] = yellow Can someone Give me refrences or Code in PHP to how to accomplish this thanks Probably have better luck asking this on the PHP general mailing list. Or any of the various PHP sites with forums. -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How do I find all the users that are new since my last login
Daevid Vincent wrote: I have a SQL challenge I'm not sure how to solve. But it's so common, I feel kind of stupid asking this... I have a 'user' table with 'login_date' which is an auto updated DATETIME column and a 'created_on' which is a DATETIME (but not updated after the record is created the first time) I want to show a list of users who are new since my last login. But the problem is that my last login changes for every page load (i.e. it is updated so that I can guestimate if a user is logged in still or not... I consider 10m to be the window, since rarely do users ever officially 'logout'). So I think I need to have a SQL query that only deals with the date, not the mins/secs? I'm just not sure the optimum way to do this. The other challenging part seems to me that as soon as 'login_date' is updated, then everyone that was 'new' is now 'old' because the login_date just got updated right? I kinda want the 'new' user status to persist for the whole session [or maybe even the whole day (that is, I could logout/in and those people would still show as new) -- but I can live with just being new for the session] How is this sort of thing usually handled? Do I need another column that isn't auto-updated and that just get's set upon each new 'login' session? Unlike a message board or web based email system, I CAN'T flag each user as viewed or something like that. This feature is for a network type scenario where a user can see new users added to their network of friends since the last time they logged in. Or so the Administrators can see all new users. This type of thing. And what is the optimal SQL incantation to deal with just the date portions and ignore the hh:mm:ss part? ÐÆ5ÏÐ DATE() - or maybe DATE_FORMAT() if you want a specific format -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Question about mailing list protocals
I have been subscribed to this list for a couple of years now. I don't often respond and rarely ask questions, but I do read it every day and typically learn something new. Around the 13th of this month I suddenly stopped receiving the mailing list (though I was able to send a question to the list). Are email addresses dropped from the list if they are inactive for a given period of time? Can notices be sent out before that to inform the readers? I ended up simply having to resubscribe to the mailing list to start receiving it again. And had to go into the archive to find my last question (which no one answered by the way :) ) Respectfully, Ligaya Turmelle -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
stored procedure TYPE
*Disclaimer - this will be kind of vague mainly because I only vaguely recall the material. I am trying to create a stored procedure. Now I vaguely recall reading something that says I have to match a column type if I am messing with one. Something like I want to match a table column type... even if I don't know what it is. I think it was something like TYPE table.column... I'm not sure if it was only in a DECLARE or if I can set one of the INOUT vars to the column type as well. Hell I can't even remember if it was MySQL or something I read about while researching stored procedures in general and it dealt with a different database system Anyone have any ideas what the heck I am talking about or if it is even supported in MySQL? If it is - any help pointing me in the right general direction to get some information on it would be helpful. If it isn't - I will just make the datatype fixed. I have been looking over the MySQL manual pages on stored procedures, the articles on the MySQL developer zone and google (of course) and can't find it anywhere. -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: problem with encoding utf8 in text field
Grzegorz Smith wrote: Hi all. In my apps I use two languages: english and my national polish. Translates i keep in MySQL 5.0 in text field (MyISAM engine) with utf8 encodings. I don't know why but i can get polish translates from databes properly, my national character are seen from webb like sign ?. I connect to database with URI like host://[EMAIL PROTECTED]:database?read_default_file=mysql configuration file e.g. c:/windows/my.ini in configuration file i have: [client] port=3306 default-character-set=utf8 [mysql] default-character-set=utf8 [mysqld] port=3306 default-character-set=utf8 Does anyone can tell mi what I'm doing wrong? Richard Lynch on the PHP general mailing list gave a response to a question very similar to yours... I'll just copy and paste it for your information: Check the HEADERS your web-server is sending. If they don't have Charset UTF-8 in there, it won't work on REAL browsers (Mozilla based) Then, for reasons known only to Microsoft, you have to use a META tag to define the Charset for IE. MS will *ignore* the headers in favor of a heuristic whereby they count the number of characters in any given document which do/don't fit into various common charsets, and then they choose the charset based on that. Apparently, MS assumes that web-designers who can only handle META tags are smarter than developers who use header() function. Go figure. :-^ -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL Certification Questions
the study guide? Adrian Bruce wrote: Hi Does anybody know where i can get a load of sample questiosn for the MySQL certificate exams, i know there are a few on mysql's site but i was hoping to find quite a few to practice on. Thanks Ade -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: error connecting to db.
remove the @ - it surpresses the errors. set your error_reporting to E_ALL and find out the DB error message with mysql_error. error_reporting(E_ALL); $SvrConn = mysql_connect($MySQLServer, $MySQLUser, $MySQLPassword); if(!$SvrConn) { echo 'Failure to connect! Error message returned: '.mysql_error(); } [EMAIL PROTECTED] wrote: I have a php application that connects with MySQL using: $SvrConn = @mysql_connect($MySQLServer, $MySQLUser, $MySQLPassword) where: $MySQLServer='127.0.0.1' $MySQLUser='dbuser' MySQLPassword='dbpasswd' and I can login using the above values. However connect fails: mysql select host,user from user; +---+-+ | host | user| +---+-+ | localhost | dbuser | +---+-+ The application worked until I changed the IP of the host. Where else might I look? There is no cnf file. thanks for any help. _ Douglas Denault http://www.safeport.com [EMAIL PROTECTED] Voice: 301-469-8766 Fax: 301-469-0601 -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: tutorial sites
google on any and all: codewalkers, phpfreaks, sitepoint, zend, onlamp, devnetwork, phpbuilder, and of course look at all their manuals/docs. Jon Miller wrote: Does anyone know of some good tutorial sites of using Apache, PHP and MySQL.? Just starting out and want to create a website (mine) where I can change up the data as often as I. Thanks Jon L. Miller, ASE, CNS, CLS, MCNE, CCNA Director/Sr Systems Consultant MMT Networks Pty Ltd http://www.mmtnetworks.com.au Resellers for: Novell Gold Partner, Cisco Partner, Peopletelecom, Westnet, Sophos Anti-Virus, I don't know the key to success, but the key to failure is trying to please everybody. -Bill Cosby -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL database design documentation
A couple of good links for databases. Database Design (quick and dirty, but gets the points across): http://www.geekgirls.com/menu_databases.htm - the from scratch side SQL: Basics: http://www.sqlcourse.com (you probably already know this stuff - but just in case. semi-Advanced: http://sqlcourse2.com (joins are specifically at http://sqlcourse2.com/joins.html). Maurice van Peursem wrote: Hi, I'm relatively new to the database-scene. I've installed MySQL on Mac OSX 10.3, which was easy. I've installed Perl support for MySQL, which was suprisingly difficult. I've installed CocoaMySQL (http://cocoamysql.sourceforge.net/) to create, inspect and backup databases. And now I'm building my first database, and that is not as easy as I had hoped. I know that use of the 'JOIN' keyword can save me pages of Perl code, but how it works exactly is not yet clear to me. Therefore I'm looking for a book, or maybe other documentation (on the web?), that can point me in the right direction. More specifically, I'm looking for a book that explains how to design and build databases, with examples of the queries in MySQL. Most books describe how you install MySQL, and list the SQL commands, but this information I already have. Can any of you suggest to me some helpful learning material? Thanks, Maurice van Peursem The Netherlands -- life is a game... so have fun. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Odd mysqld behavior
System - Windows XP SP2 Version - 5.0.15-nt I just ran into some odd behavior with the mysqld on Windows XP... I am learning about Stored procedures and went to copy and paste an example provided in an article on dev.mysql.com (http://dev.mysql.com/tech-resources/articles/mysql-storedprocedures.html). I forgot to use db before hand but remembered DELIMITER // (came back to it after a break). When I went to create a stored procedure on the command line the mysqld stopped running (after the full SQL was input and enter hit). I had to manually restart it with net start mysql on the command line. I repeated this a couple of times just to see if it was a fluke - same thing happened every time. Is this expected behavior? Stored Procedure: CREATE PROCEDURE p16 () BEGIN DECLARE v INT; SET v = 0; loop_label: LOOP INSERT INTO t VALUES (v); SET v = v + 1; IF v = 5 THEN LEAVE loop_label; END IF; END LOOP; END; // -- Respectfully, Ligaya Turmelle Life is a game so have fun -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
clarification on stored procedure syntax
Am I understanding this correctly? SQL SECURITY DEFINER... DEFINER - make sure the person who wrote this procedure had the authority/permissions to do everything in it and runs or not based on that, INVOKER - make sure the person who uses this procedure has the authority/permissions to do everything in it and runs or not based on that -- Respectfully, Ligaya Turmelle Life is a game so have fun -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: clarification on stored procedure syntax
never mind - found the paragraph in the manual.. quote The |SQL SECURITY| characteristic can be used to specify whether the routine should be executed using the permissions of the user who creates the routine or the user who invokes it. The default value is |DEFINER|. This feature is new in SQL:2003. The creator or invoker must have permission to access the database with which the routine is associated. As of MySQL 5.0.3, it is necessary to have the |EXECUTE| privilege to be able to execute the routine. The user that must have this privilege is either the definer or invoker, depending on how the |SQL SECURITY| characteristic is set. /quote. Ligaya Turmelle wrote: Am I understanding this correctly? SQL SECURITY DEFINER... DEFINER - make sure the person who wrote this procedure had the authority/permissions to do everything in it and runs or not based on that, INVOKER - make sure the person who uses this procedure has the authority/permissions to do everything in it and runs or not based on that -- Respectfully, Ligaya Turmelle Life is a game so have fun -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Joins Tutorial Anywhere?
bit simplistic but http://sqlcourse2.com/joins.html Rich wrote: Hi folks. Any chance on a tutorial from joins? I find them totally confusing and I know there's some power in them, so I need to learn them. Having asked that, another question arises...do my field names in different tables within the same database have to overlap (same field name) in order for joins to work? I'm currently naming fields in such a manner: TABLE1 table1_alpha table1_bravo TABLE2 table2_firstname table2_lastname Appreciate any guidance on these two questions. Cheers -- Respectfully, Ligaya Turmelle Life is a game so have fun -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Documenting and visualizing a database
+1 - it is wonderful. olinux wrote: You will love this. http://www.fabforce.net/dbdesigner4/ Josh --- Jeffrey Goldberg [EMAIL PROTECTED] wrote: This is probably a FAQ, but I haven't been able to find the answer. Briefly, I am looking for tools that will help me document a database. Visualization would be nice too, so that I could quickly see the relations between tables. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -- Respectfully, Ligaya Turmelle Life is a game so have fun -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: noob : advice on design?
fast and dirty - http://www.geekgirls.com/menu_databases.htm Do the design from scratch on the right side. Monty Harris wrote: Dear Group, I have just completed the Sams MySQL in 24 hours and feel like I now have a reasonable understanding of creatinf queries, etc. However, the one area that seemed sadly lacking was that of database design. I recently purchased a book named Database design for mere mortals, which seems to be very slow going, and is going to take me forever to get through the 550 pages. I'm not looking for a quick fix, but there has to be some middle ground. Is there anywhere I can go to get a reasonable working knowledge of database design just so I can get started with the task I have been given. In the meantime I can make my way through this book. So, where do I go to learn about the initial design, seeing as it is so crucial? -- Respectfully, Ligaya Turmelle Life is a game so have fun -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: utf8 questions?
have you altered your php.ini file in the mbstring section? I don't know if it makes a difference but I have always changed my to: ; language for internal character representation. mbstring.language = utf8 ; internal/script encoding. mbstring.internal_encoding = utf8 and have never had a problem. D. wrote: Hi, this might not be a mysql problem, but hopefully someone will be able to answer, thanks in advance. I notice a lot of people had asked the same question and the typical response in the mailing list seemed to be, make sure you encode the data to utf-8 before insert into mysql..., or something similiar. I have tried that too, but somehow it didn't work out.. what i'm trying to do is, to make everything utf-8, so that there is no conversion between database - connection - php - output (at least on the server level) the first thing i did was to set mysql charset variables: character set client utf8 character set connection utf8 character set database utf8 character set results utf8 character set server utf8 character set system utf8 all database, tables are created in utf8 output HTML charset: utf-8 (I even set the php code to utf-8...dont know if that's useful...) case 1: when i input traditional chinese characters on internet explorer (charset utf-8) and store them into database, supposingly there's no need to go through any encoding conversion? (the browser will send the data in utf-8? i did a utf-8 validation, just to make sure all the data are utf-8 before i insert, and the data was utf-8 validated.) when I extract the data from mysql: 1. it works fine, almost all characters can display properly, except for some characters. (example: ? ?, will show up as ? ?) 2. NONE of the data showed up correctly in mysql query browser case 2: i inputed in a set of test data in mysql query browser, and it shows up properly in mysql query browser, but when i try to fetch the data from my php, and render it to browser( charset utf-8), it shows up ? (that's the problem other ppl are having i guess, but i have done all those encoding steps, did I?) phpMyAdmin (my version 2.6.1beta, and 2.6.1) behaves the same way mysql query browser does. just to make things less complicated, instead of getting data from browser, i tried to get from uft-8 encoded files (same bad result), and i tired to make the data contained in a variable inside the php code page(utf-8 encoded), same problem occured. and lastly, i tried to output the posted data back to browser(without going through database), internet explorer renders all characters properly. so it seems to me that i'm missing something on the php mysql communication level. is that so? other information: php 5.0.3 apache 2.0.53 windows xp sp2 mysql 4.1.10a with innoDB/utf8 default mysql query browser 1.1.6 phpMyAdmin 2.6.1 mysql mysqli I notice that phpMyAdmin doesn't have this problem when it displays the data it stores, probably this is not a mysql issue, (phpMyAmin works well with MySql Query Browser too, i must have missed something in php i guess), hopefully someone will be able to tell me, so my questions are: after setting mysql charset to utf-8, and beside making sure the data is encoded in utf-8 properly (which i think i did), what else do i need to do on the programming level? or could i have done wrong in some of the steps? or could i have not done some necessary steps to work with mysql charset features? and lastly, is it possible to develope an encoding conversion free program(at least on the server(s) level)? any inputs will be appreciated. I thank everyone in advance. de-zhao -- Respectfully, Ligaya Turmelle Life is a game so have fun -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Data Types in Mysql
in the docs - column types: http://dev.mysql.com/doc/mysql/en/column-types.html Respectfully, Ligaya Turmelle Mohsen Pahlevanzadeh wrote: Dear,I need to MySQL data type or another. But i dont know name of their header file. Please guide me.. Yours,Mohsen -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: query problem in num_row
Your not getting a valid result from your query. Add if (!$result) { echo 'Bad query - message: ' . mysql_error();} I think it will give you a syntax error on your query. MySQL syntax for the LIMIT clause is: [quote] The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must be integer constants. With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1): mysql SELECT * FROM table LIMIT 5,10; # Retrieve rows 6-15 [/quote] Respectfully, Ligaya Turmelle Aji Andri wrote: here a syntax $query=$conn-Execute(select * from itemlocation where id limit 1 - 50); $result=mysql_query($query); $num_result=mysql_num_rows($result); and error message are syntax error in $num_result=mysql_num_rows($result); object unknown can someone please give a direction all I want to do is comparing data in itemlocation with a value and if value in item location is smaller then the value I make then it will appear in a message Aji __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: backup/restore
I'm a beginner - but can't you also use mysqlimport? Respectfully, Ligaya Turmelle Tom Crimmins wrote: [snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname mysqldumpfile You may have to specify a user and password as well, depending on your setup. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- Hi, I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. For backup : using Mysqldump -databases db_name ---tables table1 table2 dump.dmp For restore : used Mysqldump -databases db_name dump.dmp In the above, I am not able to restore the data. Please help us for a good solution. Thanks, Narasimha Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: trick to remember sort order?
I'm not sure I understand what your asking. Order by can be used for asc or desc (http://dev.mysql.com/doc/mysql/en/Sorting_rows.html). If you are looking to update a column in a specific order then you are using the correct syntax(http://dev.mysql.com/doc/mysql/en/UPDATE.html). I hope those links help you because I do not understand your question. Respectfully, Ligaya Turmelle --- Life is a game... so have fun. --- www.PHPCommunity.org Open Source, Open Community Visit for more information or to join the movement Dave Dyer wrote: Is there a trick to remember the sort order? I want to update some field to be the ordinal of the record according to some sort criteria. update record set ordinal=CURRENT_ROW() order by xx -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: php and mysql
Have you tried posting this to the PHP general mailing list? Respectfully, Ligaya Turmelle --- Life is a game... so have fun. --- www.PHPCommunity.org Open Source, Open Community Visit for more information or to join the movement Fernando F. Retagi wrote: Hi All! I have installed mysql 4.0.20 (went fine, I can connect), apache_1.3.31 (went fine, I can launch the web server) now I have installed php-4.3.9 and when I configure it using ./configure --with-mysql=/usr/local/mysql it goes fine , but when I try to use make, I got an error: checking for mysql_close.. Please can you help? Regards Fernando Retagi Cornastone Mozambique Lda Tel. +258 1 311700/06 e-mail: [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Newbie: How to deal with multiple languages
Looks good to me but I'm a relative beginner. Maybe another option - make Spanish, English, and German tables, then link those to the main table. This however can slow you down if you are doing multiple reads of the various tables. Respectfully, Ligaya Turmelle Graham Anderson wrote: I have a mysql db that contains tables with multiple language fields for example... Artist_id 'PK' Artist_name Artist_pictLink Artist_purchaseLink Artist_bio_Spanish Artist_bio_English Artist_bio_German I have other tables with a similar layout...Is this needlessly complicated ? track_id 'PK' Artist_id 'FK' track_name_Spanish track_name_English track_name_German track_path track_versionTotal track_purchaseLink track_pictLink Is there a better way to deal with tables that need multiple language fields...like creating another Db for that language ? trying to get the design down before I end up with a huge headache... many thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: SQL Syntax Problem
Think I found it. I made the changes with explanations of what I did. If you have any further questions feel free to ask. Oh and this should be on the list for others to see and maybe learn from Respectfully, Ligaya Turmelle head[DATABASE CONNECTION]/head body div class=formdiv form action=remote.php method=GET select name=order !-- values here are what the switch is based off of.. so I changed them-- option value=1'Country, etc./option option value=2'Population/option option value=3'Nationality/option option value=4Nationality: Plural/option option value=5Nationality: Adjective/option option value=6Geographic Region/option /select input type=radio name=direction value=0+ input type=radio name=direction value=1- input type=submit name=submit value=Submit /form /div ?php $colors = array( '#eee', '', '#ff9', '', '#cff', '', '#cfc', '' ); $n=0; $size=count($colors); $result = mysql_query('select count(*) FROM cia_people C, famarea2 F WHERE C.IDArea = F.IDArea AND F.IDParent = eur AND C.Nationality is not null'); if (($result) (mysql_result ($result , 0) 0)) { // continue here with the code that starts //$res = mysql_query (SELECT * FROM type. } else { die('Invalid query: ' . mysql_error()); } switch($_GET['order']) // use the Get method requires the $_GET super variable { // see http://www.php.net/en/language.variables.predefined in the manual case 1: $order = 'cia_people.Name'; break; case 2: $order = 'cia_people.Pop'; break; case 3: $order = 'cia_people.Nationality'; break; case 4: $order = 'cia_people.NationalityPlural'; break; case 5: $order = 'cia_people.NationalityAdjective'; break; case 6: $order = 'famarea2.IDParentReg'; break; default: $order = 'cia_people.Name'; break; } switch($_GET['direction']) // same reason as above { case 0: $direction = 'ASC'; break; case 1: $direction = 'DESC'; break; default: $direction = 'ASC'; break; } $sql = 'SELECT F.IDArea, C.IDArea, C.Name, C.Pop, C.Nationality, C.NationalityPlural, C.NationalityAdjective FROM cia_people C, famarea2 F WHERE (C.Nationality is not null) AND (F.IDArea = \'eur\') ORDER BY ' . $order . ',' . $direction; /* here we just use the local variables we moved everything into in the switch statements */ $res = mysql_query($sql) or die('Failed to run ' . $sql . ' - ' . mysql_error()); echo 'table class=sortphp id=tab_cia_people_peo thead trthCountry/ththX/th/tr /thead tbody'; //!-- BeginDynamicTable -- $rowcounter=0; while ($row = mysql_fetch_array ($res)) { $c=$colors[$rowcounter++%$size]; echo tr style=\background-color:$c\ class='. $row['Name'] .'. $_SERVER['PHP_SELF'] .'?id='. $row['IDArea'] . td class='tdname' '. $row['Name'] .'. $row['Name'] ./td tdnbsp;/td/tr\n; } ? /tr /tbody /table /body /html David Blomstrom wrote: Thanks. I guess this is turning into a PHP question now, but I wondered if you tell me one more thing. I made the change you suggested, and I now get this parse error message: Parse error: parse error, unexpected '{' in C:\sites\geoworld\about\guide\world\eur\remote.php on line 119 This is apparently the line it refers to, but it doesn't make sense to me. I tried deleting the curly braces/brackets, but it didn't fix anything. ORDER BY ' . {$_POST['order']} . ',' . {$_POST['direction']}; This is the script from Hell; every time I change it, I get a new parse error! Oh, yes - I also just discovered the single quotes in my option values, like the one after Nationality: option value=cia_people.Nationality' I'm not sure where I picked those up; are they supposed to be there? I removed them, but, again, it didn't fix anything. Thanks. head[DATABASE CONNECTION]/head body div class=formdiv form action=remote.php method=GET select name=order option value=cia_people.Name'Country, etc./option option value=cia_people.Pop'Population/option option value=cia_people.Nationality'Nationality/option option value=cia_people.NationalityPlural'Nationality: Plural/option option value=cia_people.NationalityAdjective'Nationality: Adjective/option option value=famarea2.IDParentRegGeographic Region/option /select input type=radio name=direction value=0
Re: SQL Syntax Problem
First echo out the SQL and verify it is what you are expecting. If it isn't try changing it to: $sql = 'SELECT F.IDArea, C.IDArea, C.Name, C.Pop, C.Nationality, C.NationalityPlural, C.NationalityAdjective FROM cia_people C, famarea2 F WHERE (C.Nationality is not null) AND (F.IDArea = \'eur\') ORDER BY ' . {$_POST['order']} . ',' . {$_POST['direction']}; and try it again. Note the variables are outside the string and surounded by brackets. Respectfully, Ligaya Turmelle Michael J. Pawlowsky wrote: It's not translating your vars to their respective values. I didn't look to see why... But MySQL doesn't know what $_POST['order'] is. David Blomstrom wrote: This may be a purely PHP problem, but the error message says SQL syntax. Check the manual that corresponds to your MySQL server version... Failed to run SELECT F.IDArea, C.IDArea, C.Name, C.Pop, C.Nationality, C.NationalityPlural, C.NationalityAdjective FROM cia_people C, famarea2 F WHERE (C.Nationality is not null) AND (F.IDArea = 'eur') ORDER BY $_POST['order'], $_POST['direction'] - 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 '['order'], $_POST['direction']' at line 11 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP/MySQL Problem
Are you running the 2 queries at the same time? they should be run 1 at a time. What does mysql_error() say? use it when you are checking the result set (if (!$result) { echo Error: . mysql_error();}Are the result sets being sent to 2 different identifiers? Just a few possibilities. Respectfully, Ligaya Turmelle Yahoo Default User wrote: Hi Guys, I have a problem with MySQL in conjunction with PHP so I also decided to post here: I have a PHP script that contains two consecutive MySQL queries, something like this: Query 1: Delete some rows from Table A Query 2: Insert some rows into Table A The problem is, only Query 2 seems to be executed. Query 1 is not executed at all. I tried running the script with only Query 1 and it worked. However, when I put back Query 2, then the problem comes back. What can be causing this problem? How do I solve this problem? Any help would be appreciated. Thanks! __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problem with imported data from mysqldump file
Don't know a whole lot about this but - Is the data escaped when you inserted it? Maybe one of these options for the mysqldump would help --fields-enclosed-by=... --fields-optionally-enclosed-by=... --fields-escaped-by=... or --set-charset ... Respectfully, Ligaya Turmelle Juan Alvarado wrote: I am generating a backup of a database using mysqldump and using that dumped file to repopulate another database. The dump and import process work just fine, BUT I am having some problems in my application with some enconding issues. For example, one of the rows that mysqldump outputs is the following: INSERT INTO ap_step VALUES (9,'Determine if former employees UIDs are re-assigned. And if so, determine if a process exists for evaluating user rights.',3,3); As you can see the second column has some text with some single quotes. When I import the generated dumped file into the new database, I lose the single quotes in the text and this is causing some UTF-8 encoding problems in my application. select ap_step from ap_step where ap_step_id =9; ++ | ap_step| ++ | Determine if former employees UIDs are re-assigned. And if so, determine if a process exists for evaluating user rights. | ++ You will notice from the above query that the single quotes are gone. Whenever I remove this row from the table, my application works just fine. This is why I am almost certain that there is some encoding issues here. I need to be able to load my data back into the new database exactly as it is coming out of the old one. One thing that I do want to note is that the dumped file is generated in Windows XP and it is loaded into a new database in a Unix environment. If anyone could please point out some ideas I would appreciate it as this is basically a show stopper for us right now. Thanks in advance - Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: creating a DB wwith multiple languages
Why not set the DB character set to utf8 and probably cover all of them? CHARACTER SET utf8; Respectfully, Ligaya Turmelle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am just beginning down this roadso the answer may be obvious Is there an efficient way to design a database where the table data contains fields with multiple languages ? like the Artist Table: artist_id english_name spanish_name portuguese_name english_biography spanish_biography portuguese_biography Is it better to make 1 db for each language or is there a more efficient way to design a multi language db many thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: creating a DB wwith multiple languages
Why not set the table to - CHARACTER SET utf8; Respectfully, Ligaya Turmelle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am just beginning down this roadso the answer may be obvious Is there an efficient way to design a database where the table data contains fields with multiple languages ? like the Artist Table: artist_id english_name spanish_name portuguese_name english_biography spanish_biography portuguese_biography Is it better to make 1 db for each language or is there a more efficient way to design a multi language db many thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Advice on Database Schema Design
I think I get what you are trying to do and it sounds good (though I am still a beginner). The only thing I can think that might cause a problem is since you have more then a couple of tables you MAY have to write joins for all of them . Only you would know if you can do that and/or be comfortable doing it. To get a stronger idea though of your design I would need to see either a logical ER diagram or all of the creates (I am very visual so I like pictures). *shrugs* whether or not you want to pass those along is up to you. Respectfully, Ligaya Turmelle Robert A. Rosenberg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am converting a form that was originally designed to be Email Submitted into a Submit-to-PHP-Page Form (which will then insert the data into a MySQL Database). I expect no problems in actually scanning the submission to extract the data but I have some questions on the design of the Tables that I will need to define to store the data. I have done some research and have come up with a tentative design that I want to post here for critiquing. Here is what I have come up with. Each form will get assigned a sequence number (SubmitterID) that will identify the form submission in all the tables (thus linking them). There are a number of TextAreas where the user is requested to enter free form replies to questions. I am thinking that these should go into a separate table as Text fields of the correct size with SubmitterID as the Primary Key. That keeps the data away from the main table and thus only accessed when needed/requested as well as not bloating the size of the main table or slowing its retrieval/processing. There are a number of blocks of CheckBoxes on the form. While I could, in theory, use a SET column type to store them, I get the impression that a better way is to create a Many-to-One table for each block with the total contents of each row being the CheckBoxID and SubmitterID (in that order) as the Primary Key. A Index for SubmitterID would also be defined. This way I can do a WHERE on either Column and get Index Usage as opposed to needing to do a row-by-row lookup. I have the impression that doing a WHERE over a SET Column (especially when I'm looking for more than one value) is not a good or efficient idea. The CheckBoxID would map to a 3rd table to get the actual CheckBoxName. There are also two Select Tables (one for US States and one for Countries). While the States are passing the USPS 2-Letter State Codes, the Countries are passing the full Country Name as their OPTION VALUE=. I want to make a State Table and a Country Table using respectively the 2-Letter Code and a sequential reference number (which I will revise the Country OPTION tags to use as their VALUE) as the Primary Key with the State or Country Name as the other column. To create the reference key and populate the OPTION pages with it I plan to take the current HTML for these tags and read them into a Text Editor where I will then alter them into MySQL Insert Commands to populate the Table. Then using a one-shot QuickDirty PHP page, I will read the table and recreate the Option Statements which would the be CutPasted into the original HTML code replacing the old versions of the tags. The states go though the same Turn into INSERT Commands but there is no need for post processing or HTML Tag replacement. Of course all the Table Pointers would be defined as Foreign Keys to insure Referential Integrity. Am I making any mistakes in my design or am I on the correct track. I welcome any critique of my design or advice on how to improve it. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can you rename or copy a database?
I want to make an exact copy named works2. what about INSERT INTO table1 (table1Columns) SELECT table2Columns FROM table2; David Blomstrom [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- Schalk [EMAIL PROTECTED] wrote: I would suggest exporting your current database as a .sql file taking across all structure and data. Create your new database and run the .sql file on it. Thanks for the tip. Let me just make sure I understand the mechanics. Let's say I have a database named works that features four tables. I want to make an exact copy named works2. Would I export works as works2, then create a new database named works2, then place the SQL file works2 inside the database works2? Thanks. __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copying Tables with Foreign Keys
are you using: INSERT INTO new tablecolumns SELECT oldcolumns FROM oldtable; I am still a relative beginner and this was the way I was taught. I have personally never had a problem (but then I was using Oracle in school). Respectfully, Ligaya Turmelle David Blomstrom [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can you run into problems when copying tables with foreign keys? I want to copy my Nations and States tables, making versions designed only to hold lengthy articles. I copied and coverted the States table successfully, but I'm running into problems with the Nations table. I get an error message referring to foreign key constraints. When I try it again, phpMyAdmin tells me the table has already been created. When I refresh the page, there it is! But there's no data in it - even though I directed it to copy the structure AND data. Is there a way to copy just a certain number of fields? All I really need (I think) are the columns with the nation's names (so I know which row is which), the column with abbreviations (for joining) and a third (and new) column for pasting articles. Thanks. __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: From the top! (primary/foreign keys)
CREATE TABLE Continent ( CCODE VARCHAR(6) NOT NULL UNIQUE, CGROUP VARCHAR(255), TYPE VARCHAR(255), NAME VARCHAR(255), NUM_ID INT(4) NOT NULL UNIQUE, PRIMARY KEY (CCODE), TYPE = InnoDB); CREATE TABLE Nations ( NAME VARCHAR(255) NOT NULL UNIQUE, TYPE VARCHAR(255), NCODE VARCHAR(6), CCODE VARCHAR(6), PRIMARY KEY (NAME), INDEX (CCODE), FOREIGN KEY (CCODE) REFERENCES Continent(CCODE) ON DELETE RESTRICT ON UPDATE CASCADE) TYPE = InnoDB; I beleive that should get you what you are looking for ( I too am still a beginner so there are probably many more efficent ways of doing it). I noticed that you CCODE in the Nations table wasn't the same size as in the Continent table. Fixed that. Good luck! Respectfully, Ligaya Turmelle David Blomstrom [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OK, I've made some changes, and I'm still trying to figure out this foreign key stuff. This time, I'll focus on just two tables, named continents and nations. I put screen shots of their structure and some sample rows online at http://www.geoworld.org/try.gif It sounds like non-repeating numerals are generally preferred for use as primary keys, but letters can be used. I'd greatly prefer to use letters, because it's much more easier for me to match them with their respective countries and continents when working on related tables. But if this experiment fizzles out, too, I may abandon abbreviations and just use numerals for my primary keys. At any rate, I want to join the continents and nations tables via a shared column named CCode. In the continents table, it's designated a foreign key, and none of the codes repeat. In the nations table, some of the values do repeat - obviously, Canada and the U.S. both merit the abbreviation na (North America). If I understand correctly, I have to designate a column a unique index BEFORE I can make it a foreign key. I tried designating the CCode field on the table nations a unique index, without success. Is that because of the repeating values? I then tried to designate a column with non-repeating numerals a unique index, but that didn't work, either. I finally learned how to create a foreign key with phpMyAdmin, but that doesn't work, either. I put screenshots of my trials online at http://www.geoworld.org/fk.gif (The second table was then named nations2, but I've since renamed it to nations.) If the only solution is to make all my primary keys non-repeating numerals, then I'll go that route. If there are other problems, then I'd like to know if anyone on this list knows how to designate foreign keys with either MySQL-Front or SQLyog. I've used them as workarounds for other problems I have with phpMyAdmin, but their Help sections are worthless for foreign keys. Thanks. __ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: newbie question: best column type for other languages
Don't quote me on this but I don't think it makes a difference what datatypes you use with multiple languages (I never even considered it with English, Japanese and Korean) as long as the field is large enough to handle the multiple bytes. You might wish to check out the Unicode support pages of the manual. I also vaguely remember that when using an index on a multibyte column you have to be careful. Why - I can't remember (maybe it was for an older version) but you might wish to research it. Quote from manual under Unicode support: To save space with UTF8, use VARCHAR instead of CHAR. Otherwise, MySQL has to reserve 30 bytes for a CHAR(10) CHARACTER SET utf8 column, because that's the maximum possible length. Venkatesh Madurai [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello ! I am not very sure about this, and so, this could be viewed as a dumb newbie question. I need to add various data in different languages into mysql. The data includes characters such as A`WmdV², JÆÁõu, ÁÈøÓ uÁÔ¯, ÃnõÚ, ö£õ´¯õÚ,£¯ÚØÓ , etc. Later, on a web page, people would search for those strings by typing the search queries using the relevant fonts, and the page would search from the database. I tried to use varchar, and it seemed to work. But i am not sure what all column types can i possibly use? I just need indexes on some columns (doesn't have to be primary or unique). Thanks in advance, for any tips/ideas Regards Venky - Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: foreign keys help
Don't foreign keys need to be explicitly indexed? Respectfully, Ligaya Turmelle saiph [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi list, i'm studing foreign keys but my sql code does not react as would imagine when i insert inconsistent data. i.e. create database urls; use urls; create table caths ( name varchar(7) primary key ) type = innodb; create table urls ( name varchar(10) primary key, home varchar(30) unique, cath varchar(7), constraint fk foreign key(cath) references caths(name) on update cascade on delete set null ) type = innodb; load data local infile caths.lst into table caths; load data local infile urls.lst into table urls; why it it possible to insert urls such as: mysql mysql.com dev-null when dev-null in not a value of the attribute caths.name? thanks. -- here are more things in heaven and earth, horatio, than are dreamt of in your philosophy. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Populating database...
Only way I know of is to write a program for it. But I am a beginner. Respectfully, Ligaya Turmelle beginner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, i just created a db with around 30 tables and i need to populate it. Is there any software or special technic for doing that automatically (using random characters for example)? Thanks, ltcmelo __ Yahoo! Messenger - Fale com seus amigos online. Instale agora! http://br.download.yahoo.com/messenger/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Complete confusion
If your looking for just sql tutorials check out http://www.geekgirls.com/menu_databases.htm which is tutorials for the basics of database and databases design or go here http://www.sqlcourse.com/ for a tutorial on basic SQL or here http://sqlcourse2.com/ for a look at some of the more advances stuff. Hope that helps. Respectfully, Ligaya Turmelle SeeNewIdeas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Rhino, What I was referring to was the mySQL statements. I'm working on redoing the form so there is no problem there, it is how to use the statements to code what needs to be done. I know everybody has to begin somewhere when they're learning how to do this I'm just looking for the best tutorial perhaps that has sample coding so that I can follow along and adapt it to what I need. Thanks dawson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: need help with a query
sounds like you need a join. Select * from Poll, poll_votes where (Poll.poll_id = poll_votes.poll_id) and (poll_votes.user_ID = WHATEVER); But I'm still a beginner so Respectfully, Ligaya Turmelle Anders Gjermshus [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi. I'm having trouble with a query. I'm wondering if it is possible at all. I'm making a poll for my webpage. I have two tables: Poll and poll_votes Table poll contains data about the poll Poll_Votes contains all the votes. What I want is to pull out data about the poll and if the user has voted or not. I have tried many different queries, but I haven't managed to get it to work. Can someone help me. My poll_votes table has this structure: Poll_id User_id Time I hope someone can help me. - Anders Gjermshus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: select unique records
Check out DISTINCT. Respectfully, Ligaya Turmelle Clive Luk [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Use Select * from a Group by [your_field_name] -Original Message- From: nullevent [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 9:43 AM To: [EMAIL PROTECTED] Subject: select unique records Hi mysql, i have table 'a' with one field 'name', which contains many dublicated records, like SELECT * FROM a; +---+ | name | +---+ | Peter | | Ivan | | Peter | | Peter | | Dima | | ... | +---+ Now i want to see list of names (not repeated). How can i do it? Tnx, nullevent -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Strings and variables in select statements
I'm a beginner so don't quote me. I beleive you need something like: Select hs_identifiers.hs_id_num from hs_identifiers, where (accession_num LIKE (result of another select statement)%); I beleive that should give you the first part and if there is anything after it. Respectfully, Ligaya Turmelle Annie Law [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I would appreciate help with the following. I have a table where each of the values in a column consists of a combination of letters and numbers followed by a decimal then a single digit. Examples of the two types of entries that could be found in this column(accession_num) are: BQ877252.1 AA3588976.2 and possibly T84780 The entries above are found in a table called hs_identifiers. The hs_identifiers table has two columns accession_num and hs_id_num. Given an accession_num I want to be able to look up in the hs_identifiers table to look up for the corresponding hs_id_num. This would be a simple select statement for example Select hs_identifiers.hs_id_num from hs_identifiers, where (accession_num = (result of another select statement)._) or (accession_num=(result of another select statement)); The only thing is I am not sure what the syntax is for the part (accession_num = (result of another select statement)._) In the section (result of another select statement)._) I am trying to say the result concatenated with a period concatenated with one wild card character. For example: result of another select statement = BQ877252 period is '.' and wild card character 1,2,3, etc. The whole string concatenated together would be BQ877252.1 thanks, Annie. - Post your free ad now! Yahoo! Canada Personals -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Selecting a Column
So what are you asking? I'm confused. Are you asking just to get 'Tuesday'? (SELECT DAYNAME('2004-03-23');) The value of Tuesday where inventoryid = 1? (SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1'; which you already had.) Or all the values in Tuesday? (SELECT DAYNAME('2004-03-23') FROM inventoryRoom;) Please clarify. Respectfully, Ligaya Turmelle Yoed Anis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a table that looks like this: CREATE TABLE inventory ( inventoryid int(11) NOT NULL, sunday int(3), monday int(3), tuesday int(3), wednesday int(3), thursday int(3), friday int(3), saturday int(3), PRIMARY KEY (inventoryid) ); And I'm trying to run a command like SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1'; That doesn't return Tuesday, but the value in the column Tuesday, an int of value 10. I need something like SELECT COLUMN(DAYNAME('2004-03-23')) FROM inventoryRoom WHERE inventoryid='1'; But I don't know what command I'm looking for and all my searchs have come up fruitless. Plz CC this to my address if you reply. Thanks, Yoed -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: sql question
Maybe something like: Select LIKE pkg_name%, LIKE site_%, version from table group by LIKE pkg_name% , LIKE site_%; but I'm still a beginner. Respectfully, Ligaya Turmelle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I've a table like this : site_1 pkg_name_1 version site_1 pkg_name_2 version site_1 pkg_name_3 version ... site_1 pkg_name_n version site_2 pkg_name_1 version site_2 pkg_name_2 version ... site_2 pkg_name_n version ... site_n pkg_name_1 version ... site_n pkg_name_n version And i would like to make a sql statement to obtain a result like this ; |pkg| site_1 | site_2 | site_3 ... site_n |-- |pkg_name_1 | version | version | version ... version |pkg_name_2 | version | version | version ... version |pkg_name_3 | version | version | version ... version |... |pkg_name_n | version | version | version ... version I really don't know how to write this sql request, even if there is one way to do it... I still hope someone will have an idea. Thank's for you help -- Vincent -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: help in creating table
You're using a foreign key. http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html. In order for the constraints to work, the DB must be type InnoDB. Otherwise the data checks for integrety must be done by you in the INSERT program. Respectfully, Ligaya Turmelle pramilav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dear All, I have created a table Product1 with columns pid, data, keyword. I had been requested to create another table Product2 with the columns pid, cname, itis given that (pid -int - reference to Product1). My problem is how will i create a second table. Help needed. Thanks, Pramilav -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Update statement with LIKE
Can I use LIKE in an UPDATE statement when it is not in the WHERE clause? I only know what the attribute name will end with (may be prefixed). Example: UPDATE table SET LIKE '%donut' = valueColumn1 WHERE condition1 = value1; Respectfully, Ligaya Turmelle -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqldump of UTF8 db
Odd. When I dump my utf8 database it works fine. I use mysqldump -u user --password=password -a -A --add-drop-table -c public_html/backup.sql This backs up my entire database. Here is the limk to it in the manual http://www.mysql.com/doc/en/mysqldump.html I hope it helps. Respectfully, Ligaya Turmelle PHPCommunity.org: Open Source, Open Community For more information or to join the movement www.phpcommunity.org Theodosios Paschalidis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I was just testing if my utf8 table would restore properly. When I execute mysqldump -umysqladmin -pmysqladmin test C:\mysql\bin\test-bp.sql No tables are created. Instead I what get in my DOS console (WinXpPro) is the beginning and end of the dump file (having skipped all the restoration bits!) which is what follows I am new at this. Could anybody please offer any ideas on what goes wrong here? I need to resolve this in order backup my whole database. Thank you for your time, Theo -- MySQL dump 10.4 -- -- Host: localhostDatabase: test -- -- -- Server version 4.1.1a-alpha-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLI ENT=utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; /*!40101 SET [EMAIL PROTECTED] */; /*!40014 SET [EMAIL PROTECTED] */; /*!40014 SET [EMAIL PROTECTED] */; /*!40101 SET [EMAIL PROTECTED] */; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP and Mysql
go to www.codewalkers.com under the tutorials/basics section there is a tutorial called Sorting Database Results with PHP. It will show you how to display the data. If you are just looking for a quick cheat - You need to use tables. Place each record on a table row TR and each attribute in a table data TD. Respectfully, Ligaya Turmelle Seena Blace [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Does any one help me in formating the output result in PHP with mysql? The code is here. form action=hostrep.php method=get /form ? $username=root; $password=; $database=databasename; $host=localhost; $today = date(F j, Y, g:i a); mysql_connect($host,$username,$password); @mysql_select_db($database) or die( Unable to select database); #echo Connected successfully; #$softwareid=$_GET['softwareid']; #$softwareid1=$_GET['softwareid1']; $query=SELECT hostid,hostname,cabinetnumber FROM host; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); echo bcenterHost Details $today/center/bbrbr; $i=0; while ($i $num) { $hostid=mysql_result($result,$i,hostid); $hostname=mysql_result($result,$i,hostname); $cabinetnumber=mysql_result($result,$i,cabinetnumber); echo b$hostid $hostname $cabinetnumber brbr; //echo b$softwareid $manufacturer/bbrname: $namebrVersion: $versionbrhrbr; Thanks - Do you Yahoo!? Yahoo! Search - Find what you're looking for faster. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Best Database
check into innodb and transactions Respectfully, Ligaya Turmelle Paul Higgins [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everyone, I want to create a table that will consistently have data added and removed from it. Is there anything I should know/consider before doing this? Any information you could provide would be GREATLY appreciated. Thanks, Paul _ Click, drag and drop. My MSN is the simple way to design your homepage. http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: libmysqld and PHP
You might want to post this on the PHP user lists at news.php.net sub-group php.general Respectfully, Ligaya Turmelle David Jackson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I was wondering if I can user libmysqld with PHP. If it's possible would someone post a simple exampe. TIA, David -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: pls help ...............
90% of the time you forgot the ; on the line before the parse error. if not then I would need to see the code to help you. Respectfully, Ligaya Turmelle Nitin Mehta [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] there must be some problem in concatenation of strings and number variables. If you can send the lines, we'll be able to suggest the exact change. Hope that helps Nitin - Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: [EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 12:08 PM Subject: Fw: pls help ... - Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: [EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 12:05 PM Subject: pls help ... hi , when i try to get mysql data to the web browser via php , always it is showing Parse error: parse error, unexpected T_LNUMBER, expecting ',' or ';' in /var/www/html/smsc/test1.php on line 14 error message. but i tried to rectify the essage , i couldn't. can some body help me to solve the problem ? thanx in advance curlys -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: about PHP user interface
There are excellant tutorials at www.codewalkers.com under the tutorials/basics section. Most people start with the Creating Dynamic Websites with PHP and MySQL tutorial. There are also many various forums to go to with coding problems or questions. I personally use www.phphelp.com. Respectfully, Ligaya Turmelle Togochog Enhebatu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi, I am new in PHP, and I would like to create some user interface with PHP. Could anyone tell me what is the easiest way to do this? thanks a lot, Enhebatu _ Store more e-mails with MSN Hotmail Extra Storage - 4 plans to choose from! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySql and php
You can do a simple if statement. Instead of using a foreach I would use a while with list Example in pseudocode: (while(list($col1, $col2, $col3) = @mysql_fetch_row($resultID)) and then if ($col3 == value1) echo td stuff with bgcolor = whatever; else echo td stuff with bgcolor = something else; end if echo $col3; make sense? Respectfully, Ligaya Turmelle CurlyBraces Technologies ( Pvt ) Ltd [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] - Original Message - From: CurlyBraces Technologies ( Pvt ) Ltd To: Eve Atley Sent: Tuesday, February 24, 2004 2:15 AM Subject: Re: MySql and php thanx alot for ur reply , i think better to send my script to u .In third collom , there is two different status . I want to highlight those with two different colors.There is to be satisfied some simple condition , plz help thanx curlys ?php /* Connecting, selecting database */ $link = mysql_connect(localhost, root, *) or die(Could not connect); /*print Connected successfully;*/ mysql_select_db(smsc) or die(Could not select database); /* Performing SQL query */ $query = SELECT * FROM ServiceStatus; $result = mysql_query($query) or die(Query failed); /* Printing results in HTML */ print table\n; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { print \ttr\n; foreach ($line as $col_value) { print \t\ttd$col_value/td\n; } print \t/tr\n; } print /table\n; /* Free resultset */ mysql_free_result($result); /* Closing connection */ mysql_close($link); ? - Original Message - From: Eve Atley To: CurlyBraces Technologies ( Pvt ) Ltd Sent: Tuesday, February 24, 2004 4:52 AM Subject: RE: MySql and php You want the rows to alternate colors in the table, you mean? That's easy. ? function alternate_2colors($color_1, $color_2, $cpt) { $colors = ($cpt % 2) ? $color_1 : $color_2; return $colors; } while ($row = mysql_fetch_array($result_jobslisting, MYSQL_ASSOC)) { $nb += 1; $colors = alternate_2colors('#C0C0C0', '#FF', $nb); ? tr bgcolor=?php echo $colors; ? td width=39% html content here /td /tr ? } ? Eve Atley WOW Corporation LLC. 555 North Bell Ave. Carnegie, PA 15106 TEL: 412-278-1838 CELL: 412-716-6060 -Original Message- From: CurlyBraces Technologies ( Pvt ) Ltd [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 10:05 AM To: [EMAIL PROTECTED] Subject: MySql and php hi , i have a problem with Mysql Vs php .. Can somebody help me to sort out this problem ? I wrote a php script to connet mysql data base and get some data from some table of the database. It works well .. 1data1data2 5cccxcx 3aaa123 2klklopop 4opoppop I want do the sort for the fields while its showing from the web. and in the third data field i want to add some colors while its running in the html . can some body help me to do the scripting plz ? thanx in advace curlys -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: UTF-8
version 4.1 and up are the versions to be unicode enabled. Ligaya Turmelle Beau Hartshorne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am about to start using UTF-8 for my internal data storage and display for a CMS that I'm building. Are there any issues that I should be aware of related to mysql and storing UTF-8 encoded characters? What versions of mysql offer full UTF-8 support, and are there any weird caveats with the implementation? Thank you, Beau -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySql and php
There are some excellent tutorials for PHP at www.codewalkers.com under the tutorials/basics section. You can sort the fields with SQL or with PHP (see Sorting Database Results with PHP) and in the Display section of the tutorials are Alternating row colors with PHP and MySQL and Multicolumn output from a database with PHP. If you have questions on the PHP their are multiple forums to go to for help. I personally use www.phphelp.com. Good luck Respectfully, Ligaya Turmelle CurlyBraces Technologies ( Pvt ) Ltd [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi , i have a problem with Mysql Vs php . Can somebody help me to sort out this problem ? I wrote a php script to connet mysql data base and get some data from some table of the database. It works well .. 1data1data2 5cccxcx 3aaa123 2klklopop 4opoppop I want do the sort for the fields while its showing from the web. and in the third data field i want to add some colors while its running in the html . can some body help me to do the scripting plz ? thanx in advace curlys -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: SQL-help needed
I'm still a beginner myself but try something like SELECT COUNT(YEAR), WINNER1 AS WINNER, WINNER2 AS WINNER, YEAR FROM CHAMPIONS WHERE CLASS = hd GROUP BY WINNER; I think this will give you something like: COUNT(YEAR) WINNER YEAR 2 carl1957 2 carl1985 1 mattias 1957 1 erik1985 Again I am a beginner and would have to test this to see if it actually gives me the right info or if I would have to tweek it. Respectfully, Ligaya Turmelle Computer Programmer Guam International Country Club 495 Battulo Street Dededo, Guam 96912 Tel: (671) 632-4445 Fax: (671) 632-4440 Reservations: (671) 632-4422 (GICC) -Original Message- From: Carl Schéle, IT, Posten [mailto:[EMAIL PROTECTED] Sent: Thursday, February 19, 2004 6:50 PM To: [EMAIL PROTECTED] Subject: SQL-help needed Hi! I got a table, champions, looking like this: idclass winner_1 winner_2 year - 0 hd carl mattias 1957 1 hs daniel 1982 2 hd erik carl 1985 3 js erik 1974 Imagine I want to see how many times each winner appears where class=hd and which year. In this case the answer would be: 2 carl 1957,1985 1 mattias 1957 1 erik 1985 Please help! Still using old MySQL 3.23.58. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Prefixing Column Names in Select
You can set it as an alias using AS . Respectfully, Ligaya Turmelle James E Hicks III [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Isn't there a way to prefix (or postfix) a tables column names in the results of a select. For example I have a table named from_address. This table has the column names line1,line2,line3,line4,line5. When I do a select query on from_address I want all columns to return as from_line1, from_line2, from_line3, from_line4, from_line5. James mysql, sql, row, select, delete, from, *, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: GROUP BY across UNION
I am pretty new myself but can't you do it with a join? Like SELECT AVG(avg) FROM table_a, table_b GROUP BY id_field. Respectfully, Ligaya Turmelle John McCaskey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] First of all I am using mysql 4.0.18 and I am not free to upgrade to 4.1 or 5.0. I have two tables: table_a, and table_b these two tables have the same structure: CREATE table_a ( id_field mediumint(8) unsigned NOT NULL, avg float default NULL ) What I want to do is get the combined avg across table_a and table_b for each id value. So I tried doing (SELECT AVG(avg) FROM table_a) UNION (SELECT AVG(avg) FROM table_b) GROUP BY id_field; This however doesn't work. I can see why this is thinking about how a union should work mathematically but I'm left with no apparent way to directly get the avg across two tables. I know that I can take the avg from each along with the row count and then do a weighted average using those values, but I'd prefer not to have to do that. Any suggestions or am I stuck doing individual group bys on each table uninoning the results and then doing weighted averages on the matching pairs? Here is what I'm talking about doing with the weighted averages incase it is unclear: (SELECT AVG(avg) AS avg_a, COUNT(id_field) AS count_a FROM table_a GROUP BY id_field) UNION (SELECT AVG(avg) AS avg_b, COUNT(id_field) AS count_b FROM table_b GROUP BY id_field); Then I would match up the results and compute total_avg = (avg_a*count_a + avg_b*count_b)/(count_a+count_b). This is not nearly as clean as I would like. John A. McCaskey -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: query only that return the fields that an table existe
Go here http://www.php.net/manual/en/function.mysql-field-type.php in the PHP manual and you will find in example 1 how to get all the information about a table. You can then pare it down just to get the information you want. Respectfully, Ligaya Turmelle Luiz Rafael Culik Guimaraes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Rhino If your table name is bar and it is in a database named foo, the following commands will show you the columns in that table: describe foo.bar; -OR- show columns from foo.bar; If you try either command on a table that does not exist, you get an error message. Therefore, the query only returns the fields if the table exists. Is that what you wanted? That's how I understood your question yes, this is what i want, now to get the name of fields and i should use MYSQL_FIELD with the result returned from the query like MYSQL_RES * res; MYSQL_FIELD *field; mysql_query(my, show columns from foo.bar); res = mysql_use_result(my); for (i:= 0; i=mysql_num_rows(res); i++) { field=mysql_fetch_field_direct(res,i); do ant thing with field Right Regards Luiz --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.588 / Virus Database: 372 - Release Date: 13/2/2004 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Connect to MySQL via PHP
I have never done this but... Go to your php.ini file and see if changing the [MySQL] mysql.default_host = is set to the database. Respectfully, Ligaya Turmelle -Original Message- From: Eric W. Holzapfel [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 12:00 PM To: [EMAIL PROTECTED] Subject: Connect to MySQL via PHP Hello Listers, I have a problem with my PHP/redhat setup, and possible problem with my Mysql setup. I have Apache (2.0) and PHP (4.3.2) installed on a Red Hat 3.0 ES system. I have MySql installed on a Slackware linux box. I want to be able to use Apache/PHP to connect to the mysql database on the slackware box. I think that PHP is set up ok, which may be a lie, because PHP says it does not recognize the commands like - mysql_pconnect and mysql_connect. Also if I try to connect to the database using something like this: mysql://user,[EMAIL PROTECTED] demodb this fails and the or die getMessage() returns DB: no such database. (I am trying to use the Pear DB here) Do I need to have mysql installed on the red hat machine? I can connect to the slackware linux box from a Windows machine using ODBC. Any ideas on what I have not done, or what I have done wrong? eric -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: is it possible...
Boy do I feel dumb. :^) -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, February 09, 2004 4:54 PM To: [EMAIL PROTECTED] Subject: RE: is it possible... UPDATE EMAIL_TEST_LIST SET EMAIL_DATE = curdate(); -Original Message- From: Ligaya Turmelle [mailto:[EMAIL PROTECTED] Sent: Sunday, February 08, 2004 10:42 PM To: [EMAIL PROTECTED] Subject: is it possible... Is it possible to have an update statement that uses curdate()? Example: UPDATE EMAIL_TEST_LIST SET EMAIL_DATE = (SELECT curdate()); -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
is it possible...
Is it possible to have an update statement that uses curdate()? Example: UPDATE EMAIL_TEST_LIST SET EMAIL_DATE = (SELECT curdate()); -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Character sets
I am running a 4.0.15 database and I need a table to ba able to handle Japanese, Korean, and English at the least. How can I get the database to accept these multiple character sets. I understand the default character set option but can I set multiple default character set options to multiple character sets (EUC-JP, EUC-KR, and ISO-8859-1) rather then just one. (I wish 4.1 was production right now and use UTF8)? Respectfully, Ligaya Turmelle -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP connection to MySQL fails (newbie)
Is your host name rh01? That is supposted to be the host name (www.rh01.com) or IP address(127.0.0.1). also try adding this: $db_connection = mysql_connect (rh01, llama, camel) OR die (font color = \red\ size = \+2\Could not connect to database. Please try again later/font. mysql_error()); At the very least it will allow the program to end gracefully and the mysql_error() will tell you why. drubl [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Trying to get make my first PHP connection to a DB. The mysql_connect appears to be the point of failure. The line number in the error output correlates to the call. Am able to use the same user, password, etc, to connect to the accounting database as either user llama and user root using the mysql interface. Also tried using the root account which had the same results. What am I missing? Seems too simple. Could it be a configuration issue? Many thanks for any insights! drubl -- --- Configuration: -- RH Linux 9 Apache 2.0.40 PHP 4.2.2 MySQL 3.23.54 Script: -- ?php // Connect to MYSQL $db_connection = mysql_connect (rh01, llama, camel); // Select the DB mysql_select_db (accounting); ? Results displayed by browser: - Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/mysql_connect.inc on line 26 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/mysql_connect.inc on line 26 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Newbie: need form to input records View report
I noticed you got a lot of feed back. Another site to take a look at for php is www.codewalkers.com. They have some excellent tutorials. And as a forum to ask questions in I would recommend www.phphelp.com. I have been to sitepoint and it is a good site but I prefer these for my php development. Life is a game... So have fun. Ligaya [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you want to build something like a web form you will need to use HTML and a scripting language. A common solution to do what you are asking is to use PHP. You will need to be familiar with PHP to go further. Go to http://www.php.net to get a hold of the basics. There is no way to write a walkthrough for your problem here as it would be quite long :o). It would also be repititive since there are millions of sites that provide such walkthroughs. Go to www.sitepoint.com, which is a web dev portal. My favortite. They have tons of usefull articles and step by step walkthroughs. From a big picture point of view what you need to do is use PHP to generate HTML dynamically and handle application logic, database interactivity. Use the MySQL database as your data store [obviously ;)]. PHP is an excellent choice as it works very well with MySQL. If this sounds like greek then don't worry too much. Head to sitepoint.com and go to the php section and start learning. It is an excellent resource. PHP.net is a good place too although you might want to go to sitepoint first. Best of luck, Arjun Quoting Troy T. Hall [EMAIL PROTECTED]: I know this sounds stupid but I'm totally lost. I've created a MySQL DB whose purpose is to track customers who have not gotten a newspaper. I've created all the necessary fields, and have managed to learn how to add/delete/modify the records in mysqlcc, but what I want is to have a predesigned form like you'd find on a webpage where you simply enter the complaints and hit submit or whatever, and it responds with the complaint ID # ( ComplaintID is an autoincrement field in the db ) Then I need to be able to print a report in a nicely labeled/readable format showing all entries made that day where the chargeable field is not List (Chargeable is an enum consisting of yes, no, list). Will someone please be kind enough to point me in the right direction. I can't seem to get my head around this concept. Troy oh, if it matters, I'm using Linux Mandrake 9.2 with the Gnome 2.0 GDM. I also have qtDesigner, OO, Screem. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
UTF-8 support
Can anyone tell me what the current support for the UTF8 character set is? How strong is it? Do I have to do anything special to save the characters? I will be getting the characters from a webpage form and inserting the characters with PHP. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
allowing for Japanese and Korean characters
What has to be done to mysql to allow for the insertion and extraction of Japanese and Korean characters? ( I will not be searching by them only displaying and saving them.) Do I only have to have the set the characater set in the table declaration or is there more to it? Also does the newest version of MySQL support UTF-8? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MYSQL GUI
there is no acknowledgement when a table is created. You don't find out about it until you turn off the gui and restart it. Respectfully, Ligaya Turmelle -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]