MySql Coding In Perl Manual
Can anyone point me to a good online (or downloadable) manual on MySql coding in Perl?
View Complete Forum Thread with Replies
Related Forum Messages:
Mysql Or Standard Sql Advanced Manual
I'd like to know from the experts on the group some good mysql or standard sql manuals (printed or online, and also some good sites) primarly for the query construction with complex joins and also for optimization and other arguments.
View Replies !
Cannot Open MySQL Manual (Downloaded Version)
I have just download the complete MySQL package for Windows (I am running on XP Professional), and I am unable to open the user documentation included with the package. It seemed to have installed ok, but when I click on the application I get this message: Cannot open the file: mk:@MSITStore:C:Program FilesMySQLMySQL Server 4.1Docsmanual.chm
View Replies !
Help With SQL Coding
I have three tables: table1: table2_ID table3_ID complete table3: table3_ID name table2: table2_ID table4_ID Given table3.table3_ID, I need to retrieve the value of table1.complete OR "Not Complete". I have tried this in several different iterations without success. SELECT IF(ISNULL(e.complete), e.complete,'Not Complete') as complete FROM table3 s RIGHT OUTER JOIN table1 e ON e.table3_ID = s.table3_ID INNER JOIN table2 t ON t.table2_ID = e.table2_ID WHERE s.table3_ID = 2993 AND t.table4_ID = 10029.
View Replies !
SQL Coding
I need some help writing a sql script to run in phpMyAdmin. I have a table (one of many) called products. Inside, there is a field called product_id. That same record then has another field called product_ship_price. I have a list of product_id's that I need to change the product_ship_price. Can someone give me the SQL to do this? I know it's simple, I just don't know all of the SQL commands.
View Replies !
ASP Coding Strangeness
I have been using MySQL for years but today I am stymied. I wrote a simple ASP program to tell me how many records are in a particular table: The select string = SELECT COUNT(*) FROM Products After I execute it using a recordset called 'rs, I display the contents of what is returned (rs(0)) and it properly shows me that there are 14 records in the table. But if I run an even simpler select string on that table SELECT * FROM Products I get rs.eof (a return indicating no records found.) What in the world could cause such behavior?
View Replies !
Coding In General
I just started a website, and am trying to run phpbb on it. I installed (I believe correctly) php and (again, I believe correctly) MySQL. I have enabled the MySQL extension in the php.ini, and added the extension_dir field for the lbrmysql.dll as well. When I try to run the install.php now for the phpbb, I now get a CGI time out. If I undo the changes I made, then it tells me it can't access MySQL. I know that I have PHP issues as well, but most of my problems seem to stem from the fact I have no clue how to configure the relationship between SQL and PHP. Please tell me where to start looking, and any information I need to post to help give an idea of what's going on.
View Replies !
DataBase Coding
I have converted most of my applications over to C++ with Windows but have stayed with the DBF files. I an currently producing some basic html pages and using Javascript functions which are very much like C. I now need to do some database work. i.e. allow my users to id themself and then present them with choices based on their ID. Can I do this on the server side with JavaScript?
View Replies !
MySQL, Perl CGI
I'm developing a simple computer helpdesk system with MySQL as the backend and Apache/CGI/Perl as the user interface. I've sucessfully set up the part where a user enters an issue via HTML form and "submits" it to the MySQL database. My question is: I have it set up where the user posts the issue to the database, the database auto_increments an issue_id number field. How do I return that issue_id number back to Apache so that the user can see it (and use it as a reference number)?
View Replies !
Perl-DBD-MySQL
I have a binary distribution of MySQL 4.0.20 installed in /usr/local/mysql. Therefore, the only libmysqlclient file I have is libmysqlclient.a (static library). And also, Perl:DBI already installed. I'm trying to install perl-DBD-MySQL-2.9004 from source. What should I add to 'perl Makefile.PL' as arguments to make sure it finds the static library? I've tried 'perl Makefile.PL --libs=/usr/local/mysql/lib/libmysqlclient.a and gotten this: --------------------------------- [root@localhost DBD-mysql-2.9004]# perl Makefile.PL --libs=/usr/local/mysql/lib/lib/mysqlclient.a I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/include -mcpu=pentiumpro libs (Users choice) = /usr/local/mysql/lib/lib/mysqlclient.a nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testuser (default ) = To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Unrecognized argument in LIBS ignored: '/usr/local/mysql/lib/lib/mysqlclient.a' Using DBI 1.30 installed in /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBI Writing Makefile for DBD::mysql [root@localhost DBD-mysql-2.9004]# --------------------------------- What should I do to get DBD-MySQL to install correctly?
View Replies !
Using Perl With Mysql
I have heard that if you want a view with mysql, perl is one iof the best applications to use. I want to make a user interface with perl that will prompt the user to enter values and then those values will be stored into the database. I'm just started to learn how to use perl, can anyone give me a little help with writing the code?
View Replies !
Perl DBD::mysql - Using Arrayref
I have an app where I would like to display a returned table with column headings as specified in the inquiry (select), while preserving the column sequence of columns as specified in the original inquiry - without having access to the original inquiry. If I use the fetchrow_hashref method, I can determine the column headings, but I lose the sequence. If I use fetchrow_arrayref, I preserve the sequence, but I lose the column headings. I suspect there is an easy answer. Anybody have it?
View Replies !
Dealing With Mysql Through Perl
i'm working with a mySql database. i have accessed the database through perl. now i want to know how i can store images in the databases through perl and how to retrieve it.. does anyone have an idea abt this?
View Replies !
Perl And Mysql Datetime
I am trying to have an update form for a datetime field. I've been looking all morning and haven't been able to find any examples of how to do it. I have the date in the form formatted by perl like this: 08-14-2006 11:29:28 and when I do the update to mysql nothing happens. It does not work. I need to make it so the user can put the time the student left.
View Replies !
Perl/mysql On Linux
i am not getting the output for the following code (given below) in apache server on linux. but i do get ouput in perl interpreter please replay me . vinaykumarms@rediffmail.com #!/usr/bin/perl print "ContentType: text/plain "; use DBI; # Connecting to the database # Replace DATABASENAME with the name of the database, # HOSTNAME with the hostname/ip address of the MySQL server. $drh = DBI->install_driver("mysql"); $dsn = "DBI:mysql:database=vinay;host=localhost"; $dbh = DBI->connect($dsn,"",""); # Select the data and display to the browser my $sth = $dbh->prepare("SELECT * FROM login"); $sth->execute(); while (my $ref = $sth->fetchrow_hashref()) { print "Found a row: id = $ref->{'id'}, name = $ref->{'name'} "; } $sth->finish(); # Disconnect from the database. $dbh->disconnect();
View Replies !
Verifying Mysql Writes (perl)
What is a proper way of verifying that a mysql write was successfull, and to retry if it wasnt? In my perl script I add records through: my $dbh=DBI->connect($dsn, $db_user_name, $db_password); my $sth=$dbh->prepare("insert into TABLE (X, Y, Z) values ('1', '2', '3')"); $sth->execute; $sth->finish; I have noticed that from time to time this fails, due to limitations of my webhost. I thus want to do a check after the write, that it actually happened, and if not redo.
View Replies !
Unable To Connect To Mysql Via Perl
I am attempting to connect to my mysql using a perl script, and keep getting an error message that tells me the I am missing a sub routine. I have installed DBI and DBD::mysql but still can not use my $dbh = open_dbi($db,$username,$password) I am assuming that open_dbi is not installed, does anyone know of another, or better way to access mysql via perl.
View Replies !
Installing MySQL 5 Perl DBI Must Be Installed?
the steps to installing MySQL 5 on Red Hat Linux 9? When I follow the steps as outlined in the manual or Red Hat text I get an error that Perl DBI must be installed. After attempting to download the Perl DBI; that failed because the server was not availabe. Eventually I was able to download some Perl stuff, but not the DBI. Here is the problem at its root. Where is the information to handle all of the error messages? Where is the source of knowledge to work around these problems?
View Replies !
Retreiving MySql Data With Perl (DBI)
I have been trying to retrive data out of MySql data file using DBI and Perl for a while with no luck. I get message "Can't locate loadable object for module DBI in @INC (@INC contains: C:/Program Files/Perl/lib C:/Program Files/Perl/site/lib .) at C:/Program Files/Perl/lib/DBI.pm line 258" I have DBI.pm in above respected directories. I have no problem retreiving data out of flat files ie simple text file with delimiters. I use windows xp,Perl,Apache server and MySql server at home with no other problems.
View Replies !
MySQL/Perl Book Recommendation For A Beginner?
Here's the situation: I have a Perl-based forum that I wrote myself. It currently supports user accounts, but these are stored in a flat text file (as is everything else for that matter). I'm looking to convert this to a MySQL database so that I can do more with that information, but with less processing time (reading through that huge text file to find something isn't very efficient). In the future I hope to move the whole forum over to MySQL, but I thought a good starter project would be just one aspect of it. At this point I am looking for recommendations on good books for someone moderately experienced with Perl, but who has NO experience with MySQL or anything similar. Since I'd prefer to integrate this with my existing script, I'd rather stick with Perl and not learn PHP at this time. So far it seems like "MySQL and Perl for the Web" is a good - are there others? I prefer reference-style texts with useful code examples, rather than lesson-style books.
View Replies !
Calling MySql Select Procedures In Perl
I am trying to call a "select" stored procedure from perl. I am not quite sure how to do it. Here is the stored procedure: CREATE PROCEDURE spTest() begin select x AS X from tblTest; It works fine when called from within MySQL. mysql> call spTest(): +------+ | X | +------+ | 24 | | 3 | +------+ I have the following code in perl: my $spt = $db->prepare("Call spTest()"); $spt->execute(); $spt->bind_columns($id); while($spt->fetchrow_array()){ print "X = $id"; } I get an error that says I need to use "select into". How do I call this procedure from perl?
View Replies !
Manual ORDER BY
Is it possible to manually set the order in which columns are returned? If I have a table with three fields, Dogs, Names, Ages - and I want to ORDER by names first, ages second, and dogs third - is that possible?
View Replies !
Viewing 5.0 Reference Manual
I downloaded the subject manual from http://dev.mysql.com/doc/ and unzipped it, but viewing it is a problem. It never seems to stop loading, the hour-glass never goes away, and it's almost impossible to select anything. This is with Firefox 1.5.0.11 on XP. Is this a known problem? The page/chapter version seems to work OK, by the way. (I think I'll be using the online version in any case, or PDF, because there's no easy way to search the downloaded files. Unless someone can suggest a good way, that is.)
View Replies !
Creating A Manual Auto Increment?
I have a table with 900 records. I want to add a new INT (5) field called "ID" to the start of the table. If I add this, all the records will default the field "ID" to a value of 0. Is there any way I could.... UPDATE ID SET ID = ( last record ID + 1 ) The idea being that it up dates each record like it was initialy autoincremented 0,1,2,3,4,5,6....
View Replies !
Locking Tables :: Manual Or Automatic
I am new to MySQL and databases in general. I am in the process of building a shopping cart application and came across one example that explicitly locked any table being used for reading or writing. I was just wondering if manually locking the tables is necessary or if MySql handles that behind the scenes.
View Replies !
Installation :: Unable To Open Manual
I'm really new on MySQL; I installed it on Win XP.The first problem is that I can't open the manual, the system gives me this error"unable to open file mk:@MSITStore:<MySQLdir>manual.chm".How to fix it? Trying to test the installation I typed in the shell "mysqlshow" and it gives me the error "Access denied for user 'ODBC'@'localhost'(using password NO)". In the reference manual I found that I "should create a file named windowshosts containing the following information: 127.0.0.1 localhost".Which extension? The name of the file is "windowshosts"?Where have I to put it?
View Replies !
Convert Varchar To Date Without Manual Work
I inherited a php/mysql site that has a varchar field containing a date formatted like this: 9/23/04. I would like to convert this field so that it is a true datetime field with the date formatted like this: 20040923. Does anyone know of a way to do this easily without having to change each date by hand?
View Replies !
Manual Cascade Delete Implementation Needed
I am trying to manual clean up a child table when parent table records are deleted. I tried: DELETE FROM agencyImage WHERE imageID IN (SELECT images.imageID FROM images LEFT OUTER JOIN agencyImage ON (images.imageID=agencyImage.imageID) WHERE agencyImage.imageID is null) This failed because you can't delete from a table that you are looking at. So how do I delete the record from agencyImage table if no record exist in the parent images table?
View Replies !
#1064 - You Have An Error In Your SQL Syntax; Check The Manual That Corresponds ...
I'm trying to run a SQL patch via phpMyAdmin. It gives me this error: SQL query: INSERT INTO zen_configuration( configuration_id, configuration_title, , configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function ) VALUES ( NULL , 'Condition', 'GOOGLE_FROOGLE_CONDITION', 'new', 'Choose your Product's Condition', @configuration_group_id , 12, NOW( ) , NULL , 'zen_cfg_select_option(array('new', 'used', 'refurbished'),' ); MySQL said: #1064 - 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 ' configuration_value, configuration_description, configuration_group_id, sort_or' at line 1 ....
View Replies !
Perl DBI / SQL
I need to know how to retrieve through Perl DBI a listing of possible ENUM elements from a field for processing under a CGI script. If all I need for this is some form of SELECT statement, please provide a code snippet of this so I can do it. I want to make my code so I'm not having to edit hard-coded Perl CGI scripts if/when I add new elements to the ENUM field.
View Replies !
PHP Or Perl?
As part of my own learning mysql project I'm planning to build databases for all my books and DVD's. Stephen Hawking is probably a better typist than I am so I plan to use barcodes to get the info ,taking the information from various web sites. People tell me that PHP is THE way to do database work with mysql. The thing is, I'm familiar with Perl and it has all kinds of neat string manipulation stuff and LWP. Does PHP have comprable libraries (especially LWP) and how difficult is it to move from Perl.
View Replies !
Fw: PHP Or Perl?
Do've an example on using Rebol to connect to mySQL via TCP/IP? How do you do it? How do you execute SQL quieries? Return results etc ? Do you use some kind of "middleware" that your communicating to from Rebol via TCP/IP which gets the data for you?I'm actually a Delphi, Java, VB, Perl & Ruby developer (done alittle Rebol before) but found it strange that your using TCP/IP to communicate with mySQL
View Replies !
Select Via Perl
I am trying to read a file and see if the contents of it exists in the DB or not and am trying to do it via a Select.I try to do a select * into outfile /tmp/result.txt from table where field like "%$var%"; but it always goes through the first two lines of the input file and then says the file already exists. Is this because I read each line of a file in a for loop in perl and the mysql query tries to recreate the outfile each time? Is there any other way I can dump the results of the select to a file of some sort?
View Replies !
PHP Or Perl? (or Rebol Via TCP/IP)
Do've an example on using Rebol to connect to mySQL via TCP/IP? How do you do it? How do you execute SQL quieries? Return results etc ? Do you use some kind of "middleware" that your communicating to from Rebol via TCP/IP which gets the data for you? I'm actually a Delphi, Java, VB, Perl & Ruby developer (done alittle Rebol before) but found it strange that your using TCP/IP to communicate with mySQL.
View Replies !
Error In Perl
I receive the following error when I try to acces MySQL 4.1 Client does not support authentication protocol requested by server; consider upgrading MySQL client I conntect with Perl in this way : $dbh = DBI->connect("DBI:mysql:dbname:localhost","dbuser","dbpass") or print"I can't connect" .DBI->errstr;;
View Replies !
Uninstall Perl (DBI)
i try to install Mysql Server V5 on a Redhat 5 Enterprise. But the RPM needs Perl (DBI) so I install it following the install guide provide on this site. But it' seems to not be detected by the rpm package when installed.
View Replies !
Perl Dbi And Bitfields
In the past I encoded some bit fields into hex and stored them in a short string. I now want to be able to use sql to select records according to settings of various 'flags'. So I have changed the field to a bit field and have succeded in populating it. I can display the vaules using bin(flags+0) as a string of 1 & 0s but when I try to get the value back into a perl variable from a select * it always comes back as 0?
View Replies !
Can't Get Perl To Connect
I am just trying to connect and it wont give real errors like PHP it just says internal server error. #!/usr/bin/perl use warnings; use strict; use DBI; $dsn = 'dbi:mysql:dbname=Location_Test'; $user = 'lmayer'; $password = '*******'; $dbh = DBI->connect($dsn, $user, $password, { RaiseError => 1, AutoCommit => 0 }) I can't make this work at all. I know its configured correctly since all the other pages work. I connect fine at the command line so I know the username and password work.
View Replies !
Perl Script
Is it possible to have MySQL execute a Perl script? I need to run the script upon insertion of a row into a MySQL table. I've seen myperl, but that appears to execute Perl syntax from within MySQL and won't meet our needs
View Replies !
How To Upload Images With Perl
I want to upload an image from a form, store it in the db, then retrieve it and display it on an HTML page. I am looking for a Perl code example to do the store and retrieve.
View Replies !
|