Use MySQL As Part Of A Web Page
I would be interested in hearing opinions on how easy or difficult it it to
use MySQL as part of a Web page. I have no experience with MySQL, but I have
experience with MS Access and VB. The project that I'd like to put together
is an online ordering facility for videotapes, not too many concurrent users
and relatively low volume as these things go.
I am also interested in how one would go about integrating the MySQL
database with a site constructed with MS FrontPage (2000 or 2002).
View Complete Forum Thread with Replies
Related Forum Messages:
Blank Page In Php Page With Mysql Query
I've installed PHP 5.1.2 manually, along with MySQL 4.1.18. Any php page that contains a mysql function displays a blank page . I read many article on mysql and php configuration and did not find any issue ... I copied the libmysql.dll to the system32 directory I set the extension_dir in php.ini to the extension directory of my PHP installation directory I enabled the MySQL extension in php.ini by uncommenting the line extension=php_mysqli.dll I tested the mysql connection from a dos prompt it worked , i can check ith a show database the list of the databse . But each time i put come synatc mysql in a php page the resultis a blank page . I read that we neee in php5 mysqli.dll but I found only mysql.dll do i have just to renme it..?
View Replies !
PHP Page Displaying When First Hit, Page Not Found On Refresh.
I have installed MYSQL sucessfully and PHP. I usually code in ASP (I know, I know) & SQL Server (Yes OK). And have recently turned to the light! When I load a page for the first time (On IIS) it looks fine and new data change in the database is displayed and it looks great. When I click a link to another page with links to the DB then I get Page Cannot be found, if I go back to the URL for the site (thus index.php) Refresh and then click the link it works??!
View Replies !
MySQL Uses Only Part Of The Key When I Add An OR
I'm trying to understand why MySQL isn't using all parts of the primary key when I add in an OR statement in the query. I have a people database, and a distances database. The people database lists a person's name and their location, the distances database contains the distance between any two points in the country. There are an roughly 15000^2 entries in the distances table, and currently about 100 entries in the people table. The schemas are as follows: Code:
View Replies !
MySQL As Part Of RedHat 9 Install
When I did my RedHat9 install, I choose Workstation and customized the packages I wanted install. As a part of that customization, I chose mySQL DB; however, I can't seem to find any RedHat documentation that says how to get to these installed packages. I would like to just start using them, but not sure where to start. Any hints to get up and going quickly?
View Replies !
Editing Part Of Field In MySQL
I exported an excel database with no number formatting to a comma delimited txt file and imported it into mySQL. The database contains 24000 rekords. For some reason some 3000 odd rekords were imported with .00 decimals. Is there a way through a SQL query that I can delete ONLY the incorrect .00 data from multiple fields? I don't exactly look forward to manually editing 3000 rekords!
View Replies !
Mysql Error Page
Hey would anyone have a script that redirects traffic to a different page if there is a mysql error, or... know where to get one?
View Replies !
Start Mysql From A Web Page
I built a script to start the MySql server and I have the script located in my cgi-bin directory. This is my script: /bin/sh -c "cd /u1/mydir/mysql ;./bin/safe_mysqld &" from the command prompt it starts the server but when I try it from my web page I get Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. I can run other cgi's just fine, I have the permissions set to 755. I hope one of you expert know how to do get around this.
View Replies !
MySQL Page Crashing
I have a simple ASP page, which uses GetRows to display the value of a fieldname within a DB. This page works with a mySQL db I have, which is only 10 records. I have another database (same format), which contains 1.7 million records and doesn't work. The page sits there for a bit, then crashes, displaying a "page cannot be displayed" error. How can I find out what's going on? Where is the problem occuring, etc.
View Replies !
Mysql/php Search Page
I need to make a database with following three items. 1) City Name 2) Country in which city is located in. 3) City's Zip Code That will be the MySQL part. On the php section. I want to make a search.php page in which you can type any of the above and it will return a small table with all of the values. For example. If in my database. there were: San Fransisco, California, 95001 San Jose, California, 95111 new york city, new york, 10111 and in the search.php's search box if I was to type 10111. The results will return me New York City, New Youk, 10111.
View Replies !
Save HTML Page In MySQl
What is the best way to save a HTML page in MySQL? I just need the text not the images. I intend to save several 1,000 pages. Should I create a field or referance the pages which would be saved as html files to a directory. I'm not sure what the pros/cons of each method or if there are any other ways to do this.
View Replies !
Returning MySQL Blob To Page.
I have a blob field in a database and a type field. The blob will either contain a zip file or a gp3 or gp4 file. I need to return this blob so that the user can download the file. I can download a zip simply be setting header type to application/zip and returning the blob but how do I return the others, can I just put application/$type?
View Replies !
How To Display MYSQL Data On Index Page
I am totally new to web programming. I have a MYSQL database with fields date(date, field) Celebration (variable) and slogan(variable). It contains the data for which ecah day is celebrated . eg. Date Celebration Slogan 1st Dec. world AIDS day We Care 25th Dec Christmas Merry Christmas I want take put these 'day celebrations' on my index.html page, two days in advance eg. on the 23rd Dec., I should display "Merry Christmas" On the 26th, this should be removed.
View Replies !
Delayed Page Refresh SO MySQl Can Catch Up
I have a page that displays information from my MySQL database. On this page I also allow the user to make changes which in turn changes and updates the database. When the user hits the submit button, my database information is changed but it's not changing "quick" enough for the webpage to load the new information. If I want to see the changes I made through the webpage I have to refresh twice to see it. Is there a way to delay the page from refreshing itself long enough for it to see the changes in my database or any other work-around?
View Replies !
Extract Specified Part
In one of my table, I have a date type field in format 0000-00-00, in my php syntax, how can I extract the year part only? i.e. only 2005 from 2005-07-08. I searched the help from mysql reference, but too tired for me now
View Replies !
Restoring Part
I've got a backup of all the databases on my server, which includes databases from a number of different users. How do I restore the backup for only one specific user (ie only restore his databases from the backup file)
View Replies !
Showing A Brief Part
I am wondering is there a way to show a brief part of an article? If so how? Maybe up to about 50 words. Should this be posted in the php forum? If so can someone please move it?
View Replies !
Uniqueness On Particular Part
how can i specify that a particular part of a string say from position 3 to 8 must be unique in the table Code: create table temp (a VARCHAR(25) primary key, b varchar(25), unique(b)); now thing is that i dont want all the column value to be unique for column b, just a part of this value must be unique
View Replies !
Replicating Part Of Database
I'm in need of creating reporting database. What I have to do it is to replicate only half of tables to next database so reports could query only that second database. Unfortunately there is too many inserts in existing database so simple master/slave solution won't give me much. I was wondering if there is a way to replicate just few tables? Can I use for it mysql replication or do I have to create manually scripts to do that? I expect that reporting servers is a typical way to report off of transactual systems
View Replies !
Importing Part Of A Database
I have a MySQL database and I want to cut and paste a part of it into my current MySQL database. Is there a certain place that it has to be cut ? Here is a sample of the data, can someone tell me where I start the cut. # # Dumping data for table `category` # INSERT INTO `category` (`id`, `name`, `pid`, `fset`, `weight`, `image`, `descr`) VALUES (8, 'Boat Parts & Accessories', 237, 'miscellaneous', 0, '', ''), (3, 'Exercise Equipment', 21, 'miscellaneous', 0, '', ''), (4, 'Autos', 0, 'auto', 0, ', 'Cars,Trucks,Vans,Parts & Accessories'), (5, 'Motorcycles', 0, 'motorcycle', 0, , 'Motorcycles, Scooters,
View Replies !
Reading Part Of An Entry
I'm on a crash course learning PHP and MySQL and I'm doing pretty well for the amount of time I've had to learn them; however I'm a little stuck on a small thing. I have a database field which is set to take 8 alphanumeric characters, however I want to do a SELECT procedure that takes just the first 4 alphanumeric characters. Is there an easy way to do this?
View Replies !
Replace Part Of String
I want to replace all /thiswebsite/ to /otherwebsite/ in a field called "url" of a mysql databasetable that for example contain: /thiswebsite/link_to_page1/subpage1 /thiswebsite/link_to_page2/subpage1 /thiswebsite/link_to_page1/subpage2 So with a query i need to replace /thiswebsite/ in all records where the "url" field starts with /thiswebsite/ to /otherwebsite/... The REPLACE function in MySQL does not seem to be suitable since it is made to replace the whole value, and not part of it? I need to do this because I'm working with a friendly url cms. Offcourse people will like to have the possibility to change url's, and therefor i need to change all links to it.
View Replies !
How To Do A Substr As Part Of A Query
I want to select from a table all records where the name field starts with a particular letter such as "a" or "b" and so on... but i cant seem to get the where statement to co-operate with me. this is being done in php (if that matters) and on a linux server. the current part of the query that i am trying (or should i say the last one i tried) is" AND substr(b_name,0,1) = '" . $alpha . "' AND ";
View Replies !
Searching On Part Of Feild
I have database called products with each product having a unique code and some details about the product: |----code-----| product name | product details | | 110 10 111 | 50W heater-- | bla bla bla---- | each part of the code tells some more about the product ie: 110 product group 25 product supplier 254 is the actual part number, but this is repeated at times... I would like to be able to query the database and return only products from a specified supplier of only products in a specified group.
View Replies !
Search By 'part Of' Name When First And Last Combined
I have a database that has the first and last name combined under a single column, I'm trying to search, via a php form, the table for matches. Example: Search term entered 'Charlie' Table contacts contains a column named 'name' which holds both the first and last name. (Charlie Brown for example) Is there a SQL syntax that will allow me to do this? The php form contains a field named criteria. Here is the SQL code I'm using. $sql = "SELECT * FROM contacts WHERE name = '".$_REQUEST['criteria']."'"; If the user enters Charlie Brown it will return a result, if the user enters Charlie it returns no results. Changing the database structure isn't an option so if I have to I'll load the ID and name columns into memory and use php to sort, but I'm trying to save cpu time.
View Replies !
UPDATE With SELECT In WHERE Part
I want to execute this command in mysql: UPDATE alerts SET scenario='1' WHERE alerts.cid IN(select alerts.cid from alerts JOIN data ON alerts.cid=data.cid); but I get this error message, though the syntax seems alright to me; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right.
View Replies !
Deleting Part Of A Field
i have a table called, videos, and a in that table i have description fields, that all contain a description followed by {video}randomnumbers{/video} and i want to delete the {video} + {/video} and the random numbers between but leave the other parts of the fields,
View Replies !
Multi Part SQL Strings
1. How can i browse my data base table to see if "category" contains a specific word and then return the results. ex: if a "category" is a table key and contains text, and i want to know if the text contains for instance the word "computers" 2. How can i get sql to return random keys from the category table, for instance i'd like to return 40 random entries in category
View Replies !
Emptying Part Of A Record.
I have a table with over 100 records in it, in which i need to empty out two of the fields for each record. I know how to simply drop and empty the entire table, but how can I empty specific fields for all records?
View Replies !
Changing Part Of Db Columns
I have a problem. I have 15000 in several directories. The location of the image is pointed in the column as http://xx.xx.xx.xxkirkimagejan-jun040012345.gif. I need to delete the http://xx.xx.xx.xx part and then replace the to / where the image file begins....
View Replies !
Accessing Only Part Of A Database Value
I'm currently writing a form where a user will input the first three characters of a postcode. In my database I have registered users full postcodes, but when I run my query I only want to match the from the form to the first three letters of the database value.
View Replies !
Next And Previous Buttons MySQL Rows Displaying 3 Rows Per Page
I have got a table "members" and the DB name is "jutland". I have got columns - id, name, surname & email. I want to display 100 records with 5 rows per page using PHP going back and forth with previous(previous 5 rows) and next (next 5 rows) links. I have the knowledge of the LIMIT x, y condition but still stuck on passing required parameters.
View Replies !
Sort By Numeric Part Of A Field
I must sort a table width only one column. Inside the field I have, for example, hard disk capacity (something like '100Gb' or '80Gb' or '80Gbyte' or 'Gb80'). So, if I use ORDER BY ... DESC, 80Gb will be before 100Gb and other errors. How can i sort the table only on the numeric part of the field? I'm trying using CAST() but with no results.
View Replies !
Select Part Of Text Field
I want to get a snippet from a text field. I don't want the whole thing, just the first 200 characters, for example. Is this okay or is there a better way? SELECT title, LEFT(body, 200) as body FROM table.
View Replies !
Update Query For Part Of A Field
I need to update part of a field in around 3000 rows of a table. In each case the field in question has text already in it but I need to add an extra bit of text to the start of each one. I've had a look on the web and have found examples that show you how to replace text in part of a field but haven't found anything about adding new text.
View Replies !
How Do I Update Part Of A String Value In A Field
I have information in a field as follows: |___col___| | AAXXAAA | I need up update all instances of the substring 'XX' in the 'col' field to 'YY', but I do not know how to structure the SET portion of my update statement to do this. Below is my update statement minus the set portion. UPDATE db.table SET col = <need help> WHERE col LIKE '%XX%';
View Replies !
Retrieving By Part Date Sort Of I Think
I have a database (suprisingly) that has a table called "challenges", in this table i have over 12,677 entries (rows) and counting.. each row has a date cell with an entry formatted as such 2006-10-07 03:32:00 Which is year - month - date time im building a new admin system for the site and i cant figure out how to get/sort results by date for example i would like a query that gets results for the last month or i would like a query that gets results for a certain day...
View Replies !
Fulltextsearch: Matching On A Part Of A String
I did a lot of searching but I didn't find a definite answer if it can be done or not. My question is: If I have a table with a Fulltext index on it, am I able to find rows if I search on a just a part of a string instead of searching for an exact word? Example: SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('mysqld'); gives results but SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('ysqld'); doesn't. Is there a way with Fulltext and Match to get this working?
View Replies !
Group By Specific Part Of Date
I have a field in a table with the date format. I was wondering if there is a way to group by a specific part of the date instead of the whole date? Meaning I would like to grab all records and group by year in the date column. How can I do that?
View Replies !
Thoughts On Reordering Part Of A Table...
I keep track of the order in a table with field called 'the_order' and it has integers that increment as you add content. However, when I need to reorder a record using a custom CMS I end up moving 'the_order' number to whatever position and UPDATE all items below that up one. Is there a better solution than this? If you end up having 1,000's of records you can tie up the table.
View Replies !
Trying To Write A Two-part Fast Query
The situation is this: there are two tables, one called "objects" (fields: object_id[int] and object_name) and properties (fields: object_id[int] and property_name and score[int]). Objects have one or more properties. In short, what these 2 queries need to ask are "what objects could an unknown object be, given what properties I know?" and "what property should I measure next to most narrow down the possible objects?" The objective of the first query is to return an object who has all of the given properties scored above or below the given value. For example, I might look for the object_id of an object who has the property "green" scored above 3, the property "hot" scored below 2, and the property "bright" scored above 0. It might have other properties, too, but it must have these 3. And then, for the second part, I need a query that will select properties which are NOT in this set of given properties but are relevant to the returned set of objects. In this part, I'm not concerned with the property's score - just that it is relevant to the objects. In other words, this query might tell me that the property "hard" is relevant to 3/4 objects (even though one of them had a very low score for the hard property, another had a very high one, etc). Basically I want to know which new property, once I can determine the score of this new property, will help narrow down the object-set the most, so that I can collect data for the most relevant property to narrow down the object set.
View Replies !
Get Back The Date Part Of A Datetime With A Select
My web site uses the same request, on one hand, to make selections at precise hours, on the other hand, to make selections for day: SELECT thing FROM `table ` WHERE dates = ' 2008-01-01 09:06:40 ' The daily table `table ` contains a column date in the format "date" (YYYY-MM-DD). With my former version of Mysql (5.1.14-beta), all the lines containing date = '2008-01-01' were selected. My problem is that since I've changed my Mysql version these are lines like date = ' 2008-01-01 09:06:40 ' which seem to be selected : so nobody in my daily table... Is it a problem of version of Mysql? Nevertheless my newone version is more recent (5.0.51a-6) than the former.Is it possible to select lines having '2008-01-01' without modifying my SELECT?
View Replies !
Noob: Sql To Select Part Of A Text Field
I have a text field in mysql database. record1: id:1 text_field: apple, oranges, grapes record2: id:2 text_field: grapes record3: id:3 text_field: oranges I need a sql to select records 1,2,3 for word "apple or oranges or grapes" in text_field.
View Replies !
Queries Pr.page
I use php/mysql for website, I am on novice level, - meaning I do not write php classes and such. I keep it real simple, with a simple db, full of records. question is; how many queries is normally run on a complexed site? take DevShed and imagine it was run on mysql, how many queries aprox does it need to get loaded? I am currenlty doing about 10 different queries pr. page to bring out some user details and different records of the user using 3-4 different db-tables.. and I wonder if this is normal, or if it's extremly bad programming / db design..? it loads fast enough, but it just seems alot.
View Replies !
|