Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Looking For Examples Of Huge MySQL & PHP


Does anyone know of any existing operational web sites where a massive (ie. millions of records) MySQL database combines with PHP to provide a directory service? I'm thinking along the lines of the White or Yellow Pages or similar. I ask because I'm researching a project which provides a (large) web-based specialist directory service, and I'd like to be in contact with people who've already done it with MySQL and PHP. I use MySQL and PHP all the time for small applications, but I'm not sure how they compare (in terms of speed and reliability) in the commercial world against the expensive alternatives.




View Complete Forum Thread with Replies

Related Forum Messages:
MySQL Transactional Examples
Does anyone have any examples of using Transactional processing of
MySQL with PHP? I'm not sure if the BEGIN statement needs to be in
front of my SELECT statement or processed before hand by itself.

View Replies !
Optimising MySQL Queries Against Huge Databases?
I have a database of movie titles, with about 78,000 records, and a
database of related people (directors, writers, actors/actresses etc.)
with about 141,000 records. I display a random movie out of this
database on each hit to my website's homepage.

This worked fine when I had only a couple thousand movies, but now that
the DB has grown, it seems to be taking a bit longer to process the
page.

My DB schema for each table:

CREATE TABLE `movies` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(200) NOT NULL default '',
`uri` varchar(100) NOT NULL default '',
`year` year(4) NOT NULL default ��',
`released` date NOT NULL default ��-00-00',
`imdb` int(11) NOT NULL default Ɔ',
`allmovies` varchar(25) NOT NULL default '',
`length` int(11) NOT NULL default Ɔ',
`colour` enum('c','b') NOT NULL default 'c',
`sound` varchar(25) NOT NULL default '',
`director` int(11) NOT NULL default Ɔ',
`writer` int(11) NOT NULL default Ɔ',
`asin` varchar(25) NOT NULL default '',
`image` blob NOT NULL,
`genre` varchar(25) NOT NULL default '',
`fatso` int(11) NOT NULL default Ɔ',
PRIMARY KEY (`id`),
UNIQUE KEY `imdb` (`imdb`),
KEY `name` (`name`),
FULLTEXT KEY `name_2` (`name`)
) TYPE=MyISAM AUTO_INCREMENT=78483 ;

CREATE TABLE `people` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(100) NOT NULL default '',
`born` date NOT NULL default ��-00-00',
`died` date NOT NULL default ��-00-00',
`imdb` int(11) NOT NULL default Ɔ',
`allmusic` varchar(25) NOT NULL default '',
`allmovies` varchar(25) NOT NULL default '',
`uri` varchar(100) NOT NULL default '',
`image` blob NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `imdb` (`imdb`),
KEY `name` (`name`),
FULLTEXT KEY `name_2` (`name`)
) TYPE=MyISAM AUTO_INCREMENT=141623 ;

The SQL query I am using to fetch a random movie is:

SELECT movies.id, movies.name, movies.asin, movies.fatso, people.id AS
directorid, people.name AS director
FROM movies, people
WHERE movies.image<>'' AND people.id=movies.director
ORDER BY RAND() LIMIT 1;

View Replies !
Real Life Examples Of Mysql+session_set_save_handler
In my test setup using my own session handlers with session_set_save_handler and mysql, the session handler opens and close mysql connections.

But what if my page also requires some mysql queries? Should I open a new connection or use the already opened one (opened by the session handler)?

I have made it a good practice to close a connection after a query but if I do it with only connection open no session data will be written to my mysql table.

I have seen some scripts using persistent connections but are not sure what would be the best for a real world environment.

View Replies !
GD Module Examples
Anyone here used, or is using PHP's GD module in their web design? I would be real interested in seeing what anyone has done with it on their web site with perhaps some sample code which demonstrates how they did it.

View Replies !
E-Mailing Examples Help.
I have created a form, which will allow a person to upload a picture,
and leave me mail. What I am having problems doing is, having the
form actually upload the picture and attach it to an email that is
then sent to me. If anyone knows of any sample code I could look at,

View Replies !
Pagination Examples
Basically im asking if anybody knows of any example code or tutorials where i can learn how to paginate a PHP page. I have a mySQL news table which holds stories as mark up. Ive had a look at a few examples and tutroials but most seem to have the the pages of the story in seperate rows in the database. Im also just confusing my self now with the multitude of options. Im using e107 as the back end by the way.

View Replies !
Printing Examples
Does anyone have any examples of how to send web page content to the
printer? I've looked at the PHP manual and I think I know how to do it
but I'd like be sure:

I have to open the printer first
Then I use the print write call?
Then I close the printer

View Replies !
Huge Databases
Lately Ive been working with an amazing new world plagued with HUGE databases. While having fun in this world I came to wonder "Why are my querys taking so long" so I came to phpbuilder to ask for the experts advice =)

I have done most of the normalizations things everytwhere tell me to do , index, specificd data type , etc... Code:

View Replies !
Pagination Tried Several Examples
I'm having some difficulties with php pagination. I tried several sample codes provided on the net but none worked.

View Replies !
Read Huge Flatfile
I got a huge flatfile (.txt) that I want to import in a mySQL db (1 line in 1 cell in mySQL). The file´s size is about 26 MB. Now I am trying to read and import the file that way: PHP Code:

View Replies !
Examples Of Using Inherance And Interfaces In PHP 5
As many of you knows, Zend has relased the Beta version of PHP 5. I
have allready make some tests of interfaces, classes inherance, static
and public variables, etc, and everything looks ok. Now, when you work
with PHP the most common thing is to do something with databases, you
have somehow the "same kind of pattern" like: logins, update, add,
delete data from de db, show data and that is it.

Now, I will like to use the new PHP 5 features in my next project. I
was trying to desing some clases and inferfaces for the "pattern" that
PHP use to have, and have not come with any good worthy idea. I know
Java too, so I was very happy about the the new features in PHP5 and
looking to use object model features. Im looking for very clear
examples on, how you have used the new features in PHP5 to do the "old
PHP thing"?

View Replies !
Parse Huge XML File
I need help for parsing a huge XML file with some ISP limits (I can't change
ISP, so this isn't a solution).

The ISP limits the scripts to 16MB and 10 seconds. Those params can't be
changed (no set function available either no config available).
So my file contains an export from different customers. Those export can be
quite large (20MB) and contains the full article description and the
attached pictures.

For now I parse the XML files, record the values in my DB and save pictures
on a server.
Obviously, due to the size of the actual XML and to the limits of the ISP, I
often run on Time Exceed error.

I've many articles in the XML export, each having 0 to 10 pictures. My idea
is to "refresh" the page after each article has been created in the DB.
My question are:
- how can I manage the refresh after each article ?
- how can I read from the file a block big enough to avoid to have only part
of the article description ?
I'm not so confortable with XML parsing. It's there any PHP code that will
put everything in an array in order to manage this using structures or
whatever ?

View Replies !
Getting A Script For Huge Inserts
I've a problem in here,
I need to make a 70 000 rows insert, and it's taking a lot more than 30
seconds, my problem is that it will be a script that will work in many
servers, I've no idea of how many, the set_time_limit does not work for
many of the servers out there, so I'm in trouble, I've tryed to do a refresh
every 100 inserts, but it doesn't work at all, does anyone have a class,
function or piece of code that will do that ?

Remembering that set_time_limit will not work for me.

View Replies !
PHP Tutorial Or Project Examples
I've worked with ASP, ASP.NET and
WebSpeed in the past, but now I'd like to learn PHP. I've already
gotten a Fedora web server up and running with Apache and MySQL.

I'm looking for some examples - or even better a free project - to look
over and see how other are using PHP to read/write records to and from
MySQL. I'm trying to create a very simple web based contact management
system that will store data in a couple of tables.

Can someone recommend any examples or web sites to refer to? I'm about
to dive into the PHP manual, but I'd like some other material to study
as well.

View Replies !
Printing Code Examples
I am building a tutorial site, all is working apart from 1 thing.

If i type in some php code even basic stuff like

<?php echo date ('Y'); ?>

then when its submitted into the database the php gets stripped away i'm using the tinymce editor if that helps make it clear.

I need to be able to show code examples as my tutorials are for web design does anyone know a way of showing code.

I can disable the tinycme editor and type code right into the textfeild and use the html safe values like: &lt;?php echo date ('Y'); ?&gt;

but thats not a good solution as i want to use the tinymce editor as my members will be able to write some tutorials.

View Replies !
Uploading Huge Files
Does anyone have experience in providing functionality for allowing uploads of huge files (>150MB) via a web interface using PHP?

View Replies !
Huge Table Update
I have a 70,000 row table of zipcodes, lats, longs, etc. I've added new fields to include CBSA data. Now I'm trying to update my zipcode table with the new cbsa data. So I'm doing a Select on the CBSA table, grabing each row of CBSA data by Zipcode And looping though the current zipcode table to add data to the new fields. Here's the problem. I get about 1000 rows out and then the update says done. but there is still another 69,000 rows to go. I'm not sure what is wrong, if it is my php.ini, httpd.conf, or my.cnf. I've tried I think everything.

View Replies !
Huge Table VS Many Tables
Im planning do start a project which may cause my tables to turn insanely huge (billions of rows) , so it comed into my mind the question:

Will splitting and sorting the rows by month will improve the performance of my app ??

This is because I think having a single table is more comfortable , so far, multiple table sounds like less weight for the server, even tho i dont have a single idea on how to execute a query to select from multiple tables.

View Replies !
Pointer Examples Of Cleaning
I have managed to create a very basic CMS, the CMS cover 6 pages and each page can have its title, pagetext, image link 1 and 2 altered.

I have doen the best I can but, I imagine that the code I have produced is somewhat ugly and could be clearer and slimlined. I have included the code for both the form page and the post page. Code:

View Replies !
Examples Of Autoloading Object
I'm a bit confused with autoloading objects.

This is only for PHP5, correct?

All autoloading functions start with "__" correct?

And can someone give me a easy to understand example of an autoloading object? I googled, but I still have questions about it.

View Replies !
Best Way To Manage A Huge Database
I was wondering what do you suggest is the best way to handle a huge database
lets say i have 11202 rows , and that i have 109 posible colums ! that sounds huge !

Now , for example , not all the rows use the field "air" , lets say only 1000 out of 11202 use the field and so on for other kinds of fields

Would it be better if i try something like a multidimensional tabling to retrieve information ?

I mean , i can make a new table and store there which id's from the main table have the field air , and fill the info, ie: air_id , main_table_id , air

so id get a small table that only will talk about 1000 rows and wont be a field thats 10202 times empty on the main database right ?

But imaging i make this for 104 fields out of 109 , If i retrive info from the database from multiple tables to reconstruct an item , that it use to be on the same table , Will the Database traffic get heavier?

View Replies !
Huge, Hidden Security Hole?
PHP Code:
/* magic quotes gpc is on, magic quotes runtime is off

    create table users (
    ID int primary key auto_increment,
    Profile varchar(255),
    UserLevel tinyint(1)
    );

    $HTTP_POST_VARS[Profile] = "My name is JeffCT ', UserLevel=";

*/

View Replies !
Examples To Display Day Calendar Schedule?
I am trying to find some code to help me along with dsiplaying a day
schedule. For example, a linear time-line with appointments blocked out or
colored differently.

View Replies !
Examples Of Well Written Large PHP Projects
To improve my PHP I've decided to study the source code of a medium to large open source PHP application. Can anyone recommend any applications that they would consider prime examples of well written PHP? The sort of attributes I'm interested in are basically just good software engineering such as clean internals, being well designed, good use of abstraction and also perhaps being well tested (things where there is a lot of room for improvement in my code ).

View Replies !
Uploading HUGE Video Files
I have a project where I need to figure out how to let a user with an account to upload files as large as 4GB. For files this size, I don't think it can be done through a web form, can it?

So how's it done? what's the best way to upload files of this size?

View Replies !
Searching For PDFLIB Working Examples
Can someone help me or point me to a place where I can find examples about PDFLIB that are written in PHP5.

The Examples that are provided with PDFLIB are not working. Missing fonts, images,...

View Replies !
Looking For Recent Visitor Code Examples/ideas
I am working on updating my content management page and wanted to overhaul my "recent visitor" code. The code that tracks who has been and is still on my pages.

I have not been able to find some examples I saw here a few months ago and was wondering if anyone could point me to some examples.

The more versatile the better.

View Replies !
File Upload :: Good Working Examples?
I want to make a file upload using php, but everytime i get an error
"File name not given". Any hints why this is happening? I used a sample
from php.net, and other php sites, but all samples are basically the
same. Maybe someone from you has a good and working example?

View Replies !
Any Good Examples (applications) Of Advanced PHP Code Out There?
I'm a perl programmer interested in a good application or two to
download and examine in order to learn from. Anyone know of any such
things?

View Replies !
Storing Huge Structure Persistent Or Alternative
I've got the following problem: I have a huge xml-file that represents
a street map of a city. Each street is stored as a couple of
coordinates (start, end and all the turns).
When I set a marker in a google map, I want to find all streets that
are near this marker position.
I now parse the whole file as a simpleXML object, and calculate the
distances to each street segment (using linear algebra algorithms,
that is, constructing the vector from two points and computing the
distance from the given point to this vector).
Up to now it works like this: I set a marker and the gmaps method
"gdownload()" calls a server side php script, which
1. reads the xml file into an simplexml object
2. for every two coordinates that belong to the same street, it
calculates the vector and computes its distance to the point
3. returns the nearest x streets (as polylines) back to the client

It repeats this, when I set the next marker.

Problems/need for ideas:
1) It always reads the XML file anew, when I set another marker. Is
there some way to cache this or a more intelligent approach? I tried
saving the whole Simplexml-object in a session variable, but it was
too huge. I guess I could create some tables in mysql, but I'm not
sure thats the best solution yet.
2) Not php-specific: Do you have any ideas how to speed up the process
of finding the nearest lane(s)? I tried to consider only those streets
whose endpoints are within a certain range from the given marker-
point, but it was not considerably faster and if there was a street
thats very long and straight the endpoints may be far away, but the
street itself is quite near.

View Replies !
Getting Lengths Of Mp3s Without Huge Time Delay
I have a PHP script which displays all the mp3 files within a folder to users on a webpage.  I also have another script which reads through each of these files IDE tag in order to display the length of each file next to its name on the webpage. 

However this can cause a while for the page to load as it must go thru each file separately and read its tag. I know there are other sites on the web that do this without long page loads....how do they do this? I was thinking there must be a way to go through each file say once a day and then when the user views the page they are just viewing the results of the latest 'crawl'. 

View Replies !
Mail Function Trying To Load A HUGE Page
The script then goes through the database, line by line, and sends out a personalised e-mail to the recipient. At the moment, the table is about 1500 odd recrods.

When I did the send for the first time, this probably took around 30 minutes to run. Once you click on the send button, it then sits there as if it's trying to load a HUGE page for 30 minutes and then comes back with a message to say that it was successful. Code:

View Replies !
Huge File Upload - No Access To Php.ini - Any Workaround?
I'm trying to get around some file upload problems for a client. Been looking around a lot over the last week, but I can't find anything.

The task: I want to upload 20-30mb from withing a friend's custom CMS (he tried for a week before he asked me to help!).

The environment: IIS5, PHP5, Perl. We don't have access to any config/ini files, nor can we use shell scripting, due to permissions we can't change.

The final problem seems to be that I can't change all the limits/timouts from WITHIN my script....

Does this rule out PHP? Is there anywhere else I should be looking? Any input would be appreciated... again, I have no control over the server, except for what can be done from within the script itself. Which in itself is pretty aggrevating!

(I also tried Perl/cgi but cgi times out, due to server config I guess ??)

View Replies !
Display A Huge Grid Of Blackboard Servers
Im whating to use PHP to display a huge grid of Blackboard Servers, Display the Name of the School A green light for Up, a red light for Down, a orange light for Returning then an option(box) for confirmed, backup, stable Finally a Link to the Blackboard site But still some how (Ping) the IP or (Cache) the login page. With Time Stamps, and done every 15mins. Im wanting it to Use Caching the page, but I dont know how I could use it to say ok, i couldnt cache this page , its Down.

View Replies !
Load Data From Huge File Into An Array As Fast As Possible
I've got certain data which I can't store in a db (it is too much data, don't ask) so I'll store it in an optimized file structure. Now I want to read the data from that file and get it into a specific array format:

$file_array[$id_a][$id_b] = $value; with data being like:

$file_array[1023][50123435] = 10023;
$file_array[1023][50035768] = 00234;
$file_array[1023][50003452] = 00037;
$file_array[1023][50002345] = 00002;
$file_array[566978][50000343] = 023493;
$file_array[566978][50123435] = 004543;
$file_array[566978][50003452] = 000039;

this number of items in this array can get up to 2 million items!! It takes about 4 seconds to currently load the data into the array with 1.6M items from a file which is stored like:

1023 => array ( ?' => ?', ?' => ?', ?' => ?', ?' => ?')
566978 => array ( ?' => ?', ?' => ?', ?' => ?')

Is there a better way to store the data in the file from which I can fill the array more quickly (<1sec.)?

View Replies !
Simple Select Query To Get The Huge Number Or Recors And Save In Text File
I have a huge mysql database with arround 500,000 records. All the records have a date field. Every day like 100 records been added in the database with date. I am getting this data using select query in different forms like current week, month, year and all from beginning data and save it as a text file Now the problem I am having is with the select query ...

View Replies !
PHP And MySQL: How To Properly Call A Stored Procedure With Output Parameters From PHP - Mysql, Mysqli, Or PDO
I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am
unable to call a MySQL stored procedure that returns output parameters
using mysql, mysqli, or PDO. I'm having a hell of a time with it...

The following comes from phpinfo():
PHP Version: 5.1.2
mysql Client API version: 5.0.18
mysqli Client API version: 5.0.18
PDO Driver for MySQL, client library version: 5.0.18

MySQL version, from running SELECT version(); = 5.0.18

Here's the procedure I've created in MySQL:
CREATE PROCEDURE testproc(OUT p_testvar varchar(50)) BEGIN SET
p_testvar = 'HELLO WORLD!' END
[color=blue]
>From the MySQL Command Line, I can do the following:[/color]
mysql> call testproc(@a);
Query OK, 0 rows affected (0.00 sec)

mysql> select @a;
+--------------+
| @a |
+--------------+
| HELLO WORLD! |
+--------------+
1 row in set (0.00 sec)

View Replies !
Warning: Mysql_connect() [function.mysql-connect]: Lost Connection To MySQL Server
I've set up a test server on an Ubuntu system. I installed and configured Apache, PHP and MySQL however, whenever I try to connect to a MySQL database I get this error:
PHP Code:

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/index.php on line 8
Lost connection to MySQL server at 'reading initial communication packet', system error: 111

Does anyone know what is causing this and how I can solve the problem?

View Replies !
Mysql_data_seek() [function.mysql-data-seek]: Offset 0 Is Invalid For MySQL Resu
mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 8 (or the query data is unbuffered) in /home/realfina/public_html/ec/checkout/functions.php on line 457

And how do I fix it?

View Replies !
Create A Multi Table Database In MySQL And Write To And Retrieve Information Using MySQL.
I am trying to create a multi table database in MySQL and write to and retrieve information using MySQL. I am able to insert and call data easily enough going into one table, but I am having problems with connecting tables and using the idea of normalization.

I am starting simple with an online registration for alumni of an association. My first table in a database is called alumni and it stores there e-mail address, first and last name and year of graduation. Code:

View Replies !
MySQL Error - Supplied Argument Is Not A Valid MySQL-Link Resource
I am getting the error

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/server7/public_html/71/arranholloway/database4.php on line 7

I tested my code on local computer and there were no problems, the error message only appeared when I loaded it onto my web hosters server. I'm new to PHP so its probably something simple but any help would be appreciated.

View Replies !
Warning: Mysql_connect() [function.mysql-connect]: Unknown MySQL Server Host 'sql1bravehostcom'
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'sql1bravehostcom' (1) in /misc/13/000/126/295/2/user/web/jeppers90.com/includes/fiction_mysql.inc.php on line 11
Cannot connect to server

this message is what i get when i try to upload it to a webserver..things i have done set up database put in correct information from the database in to my php form. what ever i try i can't seem to set it up .

View Replies !
Connection With MySQL. Navicat - CANNOT CONNECT TO MYSQL SERVER ON LOCALHOST
I am new in PHP & MYSQL. I installed PHP & MYSQL properly. To easy
operate for MYSQL I installed Navicat and it installed properly. But
when I am going to test the connection between MYSQL & Navicate the
error message showing CANNOT CONNECT TO MYSQL SERVER ON LOCALHOST
(10022) it should mention that my connection name = localhost, Ip =
localhost,port = 3306 , user name = root in Navicat.


View Replies !
PHP Saying Error In Mysql Syntax, But Written My Mysql Query Browser!
I have a basic db that I access with MySQL query browser. Everything
seems fine to me but I am using this db as part of a php shopping
basket and when I try to add an item I get:

Notice: Query failed: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '>function.extract]: First argument should be an
array in functions.inc.php on line 31
Notice: Undefined variable: price in functions.inc.php on line 36
Notice: Undefined variable: price in functions.inc.php on line 39
Notice: Undefined variable: total in unctions.inc.php on line 39

I'm assuming the last three are caused by this problem as price should
be passed to the cart, and total is worked out using it. However
although I know mySQL code it was the MySQL query browser that
actually generated the code and I cannot see a way to view or debug
the code.

The db has one table in it which is made up of id, name, subname,
desc, and price.

The code in the php file that is being referred to is:

View Replies !
Can't Connect To Local MySQL Server Through Socket '/tmp/mysql.sock' (2)
this is a new error message I've not encountered before. looking at the phpinfo data, it says mysql.max_links is "unlimited" I'm using mysql_connect (vs pconnect). When I try inserting mysql_close() in my functions, I get the :

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

View Replies !
MySQL Pro Certified Server Versus MySQL Community Edition
Does anyone have any experience with this? I'm trying to see if the service provided with the "MySQL Network with MySQL Pro Certified Server" version is worth the costs involved.

I'm making a real estate website that's basically going to be a listing service. You can do searches on the listings for free, and it costs to add your listing. Our listings are only going to be active for 30 days, and we really don't expect to have more than maybe a thousand or so listings at a time tops.

I'm just wondering if this is something that should be manageable for me, even though I really don't have any prior DBA experience. I've played around with phpMyAdmin for a bit, so I know how to backup/replace/repair/etc., and am just wondering if this is enough. Any thoughts?

View Replies !
Warning: Mysql_connect(): Can't Connect To Local MySQL Server Through Socket '/tmp/mysql.sock' (2) In /home/custcare/dbconn.inc On Line 2
It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com
and installed it to my Fedora system, and did *not* do anything else
(Actually I am completely new to mysql).

I wrote a test php script to test mysql (ftp_connect('localhost',
'root');), but got the following error:

Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2) in /home/custcare/dbconn.inc on line 2

I ran phpBB2 installation page, got the same error. But it can connect
to mysql using my computer name.

View Replies !
Automatic Scheduled MySQL Backup (MySQL Dump)
Is it possible to configure a UNIX/LINUX server to do a MySQL Dump for a database on an automatic schedule and then to email the dump file to me (the administrator)?

I want to be able to have my database automatically backed up every week and emailed to me for storage purposes without any action on my part.

View Replies !
PHP/MySQL: Using PHP To Probe MySQL Db And Send An Email Automatically
Let's say you have a login feature on your site... and a user forgets their password which is stored along side their email address in a MySQL database. Is it possible to use PHP to automatically send the password to that email address upon request? If so, please provide a detailed solution. If not, can Java be used in some way to accomplish this?

View Replies !
Mysql Connection - Connect To A Remote Mysql Database
I have problems getting my php webpage to connect to a remote mysql database. I can connect using the same name and password from the command prompt using mysql. I also have my own sql database on this computer that the php website can access.

View Replies !
--with-mysql ? Php-4.4.2 With Mysql Install In Special Directory
I'm trying to link php-4.4.2 with mysql install in special directory,
like /usr/newsystem/mysql, but whatever options I try, php always gets
linked to version in /usr/local/lib. I've tried several options:

--with-mysql=/usr/newsystem/mysql
--with-mysql-dir=/usr/newsystem/mysql
--with-mysql-lib=/usr/newsystem/mysql
--with-mysql-lib-dir=/usr/newsystem/mysql

....but none of them work, CLI is always build against /usr/local/lib/
libraries.

View Replies !
Create A Sequence In MySQL, With Mysql Variable?
This might be fairly easy to do and I think I've seen the code before,
but I haven't seen many good examples of this. Of course Pear::DB
probably uses this code in some of its API, probably in dealing with
auto-increment indexes and prepared statements.

Maybe I'm off base here, but I'm looking for something like this:
(psuedo-code)
Of course the seq table only needs 1 row holding id, which is
updated.
select id from tbl;
// get result resouce and do fetch, store value in $myid
set @myvar = $myid + 1; // can php send to MySQL with a query? (
never seen this )
update myseq set id=@myvar // send this statement through in a
update/query

// for use in PHP code
$newSeqVal = $myid +1

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved