[PHP-DB] MySQL Field length

2003-12-16 Thread Shaun
Hi, What is the maximum length for the name of a column in MySQL? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Get Names of columns of a table

2003-12-17 Thread Shaun
Hi, is there a PHP function that wil return the names of the columns for a given table? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Retrieve data and column names from a table

2003-12-17 Thread Shaun
Hi, I need to retrieve the data and column names from a single row in a table, i.e. 'SELECT * FROM Table WHERE Field_ID = 1' How can I get PHP to show the data and the column names? With reference to my earlier post and the replies I can't use DESCRIBE in conjunction with SELECT and I don't want

[PHP-DB] A site mapped in a database / xml

2004-01-21 Thread Shaun
Hi, I have an question on how to create a completely database / xml driven site i.e. the page names, links, the site map etc are held in the database. I think I have solved most problems but what I would really like to do is limit the number of pages I need. Can I manipulate the server such that i

[PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Shaun
Hi, I have a Bookings application. When a Booking is made it is entered in to the Bookings table. Bookings take place at Areas, held in the Areas table. Each Area has a unique Area_ID held in the Bookings table for each Booking. Each Booking needs to be completed and when done so the Booking_Statu

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Shaun
sage news:[EMAIL PROTECTED] > Mensaje citado por Shaun <[EMAIL PROTECTED]>: > > > Hi, > > > > I have a Bookings application. When a Booking is made it is entered in to > > the Bookings table. Bookings take place at Areas, held in the Areas table. > > Each Are

[PHP-DB] Row count in a query

2004-01-31 Thread Shaun
Hi, Is it possible to have an incrementing row count in my query that is not part of the table data? i.e. 1 data data 2 data data 3 data data ... This has to be done in the query not the PHP!! Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP-DB] Help with an UPDATE query please

2004-02-05 Thread Shaun
Hi, I have (among others) two DATE columns in a table; Booking_Date and Booking_Completion_Date. How can I run a query that updates Booking_Completion_Date to be 2 days after Booking_Date where Booking_Completion_Date is NULL? Many thanks -- PHP Database Mailing List (http://www.php.net/) To un

[PHP-DB] Help With An UPDATE Query Please

2004-02-10 Thread Shaun
Hi, How can I update a column where the first letter begins with 'M' and adjust it so that column ends with 'M' instead. So something like 'UPDATE table SET column = 'xxxM' WHERE column = 'Mxxx'. I hope this explains what I am trying to achieve! Thanks -- PHP Database Mailing List (http://www.p

[PHP-DB] Brick Codes

2004-02-16 Thread Shaun
Hi, I have a table of Locations around the country. My system produces reports based on these Locations. I also have a table containing Brick Codes e.g. BrickPost Code AB51AB51 AB52AB52 AB55AB55 AB56AB56 AL01AL1 AL02AL2 AL03AL3 AL04AL4 How can I compare the f

Re: [PHP-DB] Brick Codes

2004-02-17 Thread Shaun
you are using, for mysql you can > use: > > WHERE (LEFT('Brick',3) = LEFT(Post Code,3)) > > If you are using other dbserver, check your manual. > > - Original Message - > From: "Shaun" <[EMAIL PROTECTED]> > To: <[EMAIL PROTE

Re: [PHP-DB] Brick Codes

2004-02-17 Thread Shaun
Better try: > WHERE (LEFT( Brick,3) = LEFT(`Post Code`,3)) > ^^ no quotes^^ back ticks (because of the > space in the column name) > > HTH > Ignatius > _ > - Original Message - > From: "Ricardo Lopes" &l

[PHP-DB] Backup DB

2004-03-06 Thread Shaun
Hi, Can anyone recommend some software that I can use to backup our MySQL database on a webserver to a PC in the office on an hourly basis? I have found SQLjob - related to SQLyog! - which appears to do a exactly what I am looking for, however I have also come across a few posts about its poor rel

[PHP-DB] Date SELECT with IF

2004-04-15 Thread Shaun
Hi, Is it possible to have a clause in a mysql SELECT statement? I would the query to display the date except where it equals the default 000-00-00 to display n/a or something similar. For example SELECT DATE_FORMAT(B.Booking_End_Date, \"%Y-%m-%d\") AS 'Booking End Date' FROM Bookings (IF Booking

[PHP-DB] Re: Hi I am new to PHP

2004-04-15 Thread Shaun
It means there is a problem with your query, if you send the query back to the group someone may be able to help. "Andy Amol" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I have posted my problem at No: 33892 of this mailing list. I have received 1 reply. No: 33897 > > My exac

[PHP-DB] HELP URGENT

2001-04-04 Thread shaun
Fiesta i need to make a tree list that populated by a database. each new level of the tree comes from a predefined table. ie. level1 (resources) level2 (assets) level3(contacs) ect.. im having problems with this if you can help please send anything to [EMAIL PROTECTED] thanks in advance. -

[PHP-DB] connecting to sybase

2001-04-06 Thread shaun
Fiesta does anybody know how to connect to a sybase database thats using the adaptive server anywere driver??? i tried $hostname = "host"; $username = "user"; $password = "pass"; $dbName = "database name"; $table = "table name"; Sybase_CONNECT($hostname, $username, $password) OR DIE( "Unable

[PHP-DB] Why do 95% of internet business fail & only 5% succeed

2001-10-31 Thread Shaun
Dear Entrepreneur: Can you honestly say that you're earning the type of income you thought you would when you first began your networking career? Unfortunately, the history of networking says that there's a 95% chance you are not earning what you would like to earn. How many different opportu

[PHP-DB] table relationship

2003-03-10 Thread shaun
Hi, I am creating a web site which will have different types of users: Administrators, clients and staff. Is it possible/good practice to have 3 tables related to one table i.e. USER user_id (PK) |

[PHP-DB] content management

2003-03-10 Thread shaun
I would really appreciate some advice from anyone who has worked with or developed their own content management system. This is my scenario, when i have finished creating a site, i want to be able to add in the CMS with a minimum amount of fuss. I want to be able to get the CMS to recognize all th

[PHP-DB] Database design

2003-03-10 Thread shaun
Hi, I am creating a database for a web application. The idea for the application is for a company administrator to be able to log into the site and allocate staff to a project which will be a clinical trial at a particular practice. Staff will be able to log in and update the status of the project

[PHP-DB] Listing Tables

2003-03-15 Thread shaun
Hi, i would like to list all of the tables and field names in my database e.g. table 1 field 1 field 2 field 3 table 2 field 1 field 2 field 3 table 3 field 1 field 2 field 3 etc is there a simple way to do this? thanks for your help -- PHP Database Mailing List (http://w

[PHP-DB] Nested MySQL Query

2003-03-18 Thread shaun
Hi, I have just found out that I can't use nested queries with MySQL so could someone tell me how i can transform the following query for use with MySQL? SELECT * FROM Allocations WHERE (SELECT Project_ID FROM Project WHERE Project_Name = $_POST[project_name]) thanks for your help -- PHP Dat

[PHP-DB] Re: storing files in database

2003-03-18 Thread shaun
a more prerferable way to do this would be to store a reference to each file in the database, maybe renaming each file name to the 'files_id' of your table... "Michiel Van Heusden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is there any possibility using PHP 4 to store entire fi

[PHP-DB] Help with this query

2003-03-21 Thread shaun
Hi, I have the following tables in my database: CREATE TABLE WMS_Allocations ( Allocation_ID int(11) DEFAULT '' NOT NULL auto_increment, Project_ID int(11) DEFAULT '0' NOT NULL , User_ID int(11) DEFAULT '0' NOT NULL , PRIMARY KEY (Allocation_ID), ); CREATE TABLE WMS_Projects ( Proje

[PHP-DB] Help with a query please

2003-03-24 Thread shaun
Hi, I have the following table structure, as my installation of MySQL doesnt support Foreign keys i have to maintain the referential integrity myself. So if i delete a user, how can i make sure that the allocations from the allocations table where the user_id is the same as the one being deleted a

[PHP-DB] Table structure

2003-03-25 Thread shaun
Hi, I would be very grateful if someone could look at my table design for me please. The sytem will be used to allow users to log in to a web site and book staff. Here is my design so far. # -- MySQL dump -- # # Table structure for table 'WMS_Allocations' # CREATE TABLE WMS_Alloca

[PHP-DB] Catch Errors

2003-03-30 Thread shaun
Hi, Is it possible to catch the type of error message returned form a mysql_query(); funtion for example if ($error == //duplicate row for table) { echo "This row already exists in the table"; } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

[PHP-DB] Database Design Help

2003-03-31 Thread shaun
Hi, I am creating a database for a web application. The idea for the application is for a company administrator to be able to log into the site and allocate staff to a project. Staff will be able to log in and update the status of the project they are working on and clients will be able to log in

[PHP-DB] Re: Database Design Help

2003-04-01 Thread shaun
ect at each booking? > > "Shaun" <[EMAIL PROTECTED]> escribió en el mensaje > news:[EMAIL PROTECTED] > > Hi, > > > > I am creating a database for a web application. The idea for the > application > > is for a company administrator to be able to log int

[PHP-DB] Entering a Query

2003-04-01 Thread shaun
Hi, I would be very interested to see an example of how it would be possible to enter a query into a text area and the results of the query displayed on the next page, similar to PHP admin I guess, are they any examples out there? -- PHP Database Mailing List (http://www.php.net/) To unsubscri

Re: [PHP-DB] Entering a Query

2003-04-01 Thread shaun
;Ronan Chilvers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Shaun > > Comments inline ... > > On 01 Apr,2003 at 13:37 shaun shaun wrote: > > > > Hi, > > > > I would be very interested to see an example of how it would be poss

[PHP-DB] Re: Database Design Help

2003-04-02 Thread shaun
like that it may look like this: > > extraData: > > PK extraData_ID > FK Booking_ID >Description < Here you describe the data to be captured Ej. > "Location" >Data<-And here the actual data Ej. "Quebec" > >

[PHP-DB] Total Values with MySQL

2003-06-03 Thread shaun
Hi, Is it possible to get MySQL to total the values of a select statement, say 'SELECT ColumnName FROM Table WHERE ColumnName = '1'' Say I have three values in ColumnName all of '1' then can I get MySQL to return 3? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To u

[PHP-DB] Help with a DELETE query

2003-08-20 Thread Shaun
Hi, In a small part of my database I have two tables as follows: # -- MySQL dump -- # # Table structure for table 'WMS_Data' # CREATE TABLE WMS_Data ( Data_ID int(11) DEFAULT '' NOT NULL auto_increment, Booking_ID int(11) DEFAULT '0' NOT NULL , Data_Field_1 varchar(100) , Data_Fi

[PHP-DB] SELECT Part of a Field

2003-08-29 Thread Shaun
Hi, How can I SELECT a portion of a field in a table for example the first character, or the second two characters etc? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Viewing Data From MySQL

2003-09-03 Thread Shaun
Hi, Is it possible to change the way a query is displayed from a MySQL database. For example if I have a column that contains '1' or '0' can I run a query that returns 'Yes' for every '1' and 'No' for every '0'? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscr

[PHP-DB] ORDER BY Query

2003-09-05 Thread Shaun
Hi, I have a table in my database called Users. This table has (among others) two columns called Location and Name. Location will be either 1, 2, 3, or 4. How can I produce a query that groups the result into Location and then for each Location order the User by Name? Thanks for your help. -- P

[PHP-DB] COUNT & AVG

2003-09-05 Thread Shaun
Hi, Is it possible to combine the COUNT & AVG functions using MySQL? I have a table called Bookings and I need to find out the average number of bookings. So I need to count the number of bookings in the table and then get the Average, is this possible? Thanks for your help -- PHP Database Mail

[PHP-DB] UPDATE Query

2003-09-12 Thread Shaun
Hi, I have (amogst others) three tables in my database named Bookings, User, and Representative. A User and a Representative are different types of user, however I now want to merge these tables into one - User. When a Booking is made, the User_ID and the Rep_ID are stored in the Booking table. I

[PHP-DB] DATETIME Field Query

2003-09-23 Thread Shaun
Hi, I had a DATE field in my table which I have now changed to DATETIME. When querying this field, how can I retrieve say the date part, or the minutes part for example from the table? At the moment I am just retrieving the whole field... Thanks for your help -- PHP Database Mailing List (http:

[PHP-DB] UPDATE part of a column

2003-09-23 Thread Shaun
Hi, I have a column in my table called address. When users add an address with a textarea they sometimes press return for a new line and this seems to be putting line breaks into the database, so I have 2 questions: 1. How can I clean the table, so for example changing: Ashfield Business Cent

[PHP-DB] If in a query

2003-09-27 Thread Shaun
Hi, is it possible to create a query with parameters such that it selects a field if it isn't null? for example: SELECT A.Column1, A.Column2, (if not null, B.Column1) FROM Table1 A, Table2 B Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: h

[PHP-DB] Re: If in a query

2003-09-27 Thread Shaun
i'm sorry, i rushed that previous post!!! what i meant to ask was, if the value of B.Column1 is null then can the query be written such that we dont select A.Column2. Sorry! "Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > is it p

[PHP-DB] Help with UPDATE query

2003-09-29 Thread Shaun
Hi, I have two columns in my Bookings table of type DATETIME - Booking_Start_Date and Boking_End_Date. How can i update every row so that all of the times for Booking_Start_Date are 09.00 and all of the times for Booking_End_Date are 17.30, without affecting any of the dates? Thanks for your help

[PHP-DB] Calculating time unused

2003-09-30 Thread Shaun
Hi, I have a table called Bookings which has two important columns; Booking_Start_Time and Booking_End_Time. These columns are both of type DATETIME. Given any day how can I calculate how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours the

[PHP-DB] Re: Calculating time unused

2003-10-03 Thread Shaun
"David Robley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > says... > > Hi, > > > > I have a table called Bookings which has two important columns; > > Booking_Start_Time and Booking_End_Time. These columns are both of type > > D

[PHP-DB] Hours available in a day

2003-10-03 Thread Shaun
Hi, I have a table called Bookings which has two important columns; Booking_Start_Time and Booking_End_Time. These columns are both of type DATETIME. Given any day how can I calculate how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours the

[PHP-DB] Round a number

2003-10-03 Thread Shaun
Hi, I have a query that returns a number from culculation in my table. It returns say 4.00, 8.75, 0.00, 12.50 etc. How can I get MySQL to return the number without any zeros, i.e. 4, 8.75, 0, 12.5 etc? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visi

[PHP-DB] Re: Hours available in a day

2003-10-03 Thread Shaun
"Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a table called Bookings which has two important columns; > Booking_Start_Time and Booking_End_Time. These columns are both of type > DATETIME. Given any day how can I calcula

[PHP-DB] Re: Calculating time unused

2003-10-03 Thread Shaun
"Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "David Robley" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > > says... > > > Hi

[PHP-DB] HELP With UPDATE Query in mySQL

2003-10-04 Thread Shaun
Hi, I have two columns in my Bookings table of type DATETIME - Booking_Start_Date and Boking_End_Date. How can i update every row so that all of the times for Booking_Start_Date are 09.00 and all of the times for Booking_End_Date are 17.30, without affecting any of the dates? Thanks for your help

[PHP-DB] Help With Another UPDATE Query Please!

2003-10-04 Thread Shaun
Hi, I am making some alterations to my Database. I have a table called projects and a table called Work_Types. Projects currently contains the name of the work type (Work_Type) but now I want to change this so it contains the Work_Type_ID, is it possible to update Projects with one query? Thanks

Re: [PHP-DB] Help With Another UPDATE Query Please!

2003-10-04 Thread Shaun
tables and what are needing to do. > > On Sat, 4 Oct 2003 13:45:56 +0100, Shaun spoke thusly about [PHP-DB] > Help With Another UPDATE Query Please!: > > Hi, > > > > I am making some alterations to my Database. I have a table called projects > > and a table calle

[PHP-DB] Selecting two names from a table

2003-10-06 Thread Shaun
Hi, I have a table called Bookings and a table called User. Bookings are created and hold the User_ID of the User who created it (Booking.Booked_User) and the User who will be going on the booking (Booking.Booking_Creator). How can I create a report that lists both users on each row. If I do 'SELE

Re: [PHP-DB] Selecting two names from a table

2003-10-06 Thread Shaun
ing_Creator = U1.User_ID > AND B.Booked_User = U2.User_ID' > > Jack > > > > -Original Message- > From: Shaun [mailto:[EMAIL PROTECTED] > Sent: Monday, October 06, 2003 11:24 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Selecting two names from a table >

[PHP-DB] DATETIME Query

2003-10-07 Thread Shaun
Hi, I have a table called Bookings which has two important columns; Booking_Start_Date and Booking_End_Date. These columns are both of type DATETIME. The following query calculates how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours they h

[PHP-DB] PHP PopUp Window

2001-01-24 Thread Shaun Mitchell
on another note is it possible to hide the search portion of a URL that is sent using: I don't like the user seeing the sometimes-long URL that is sent using this manner. Thanks, -- Shaun Mitchell Web Developer CADVision Internet (http://www.c

[PHP-DB] Global Connection object

2002-05-01 Thread Shaun Johnston
Is it possible to make a MySQL connection object global, so that it doesn't need to be declared as a parameter to be accessed from individual functions? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Add column to a table

2002-10-31 Thread Shaun Thornburgh
Hi, Please could someone tell me what the syntax is to add a column to a table? Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Newbie Question: Convert SELECT to DELETE statement in mysql

2001-10-18 Thread Shaun Honsvick
first table, then delete the row in the second table, third table, etc. Then loop for the next intance. Theres got to be a better way. Also, after this is done should I run some sort compact or defrag on the database that restore wasted space? Thanks, Shaun "Rick Emery" <[EM

[PHP-DB] PHP & MSSQL

2003-08-11 Thread Shaun Bentley
tried pulling the data out as object, array & row but always lose the end. Any help please! Shaun -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Search engine

2006-09-28 Thread Shaun A Riches
Title: RE: [PHP-DB] Search engine What about the MySQL "LIKE" command? Research it. This is assuming your data is stored properly without redundant data and in a MySQL database. ___ Shaun Riches Computer Science Student -Original Message- From: Ron Pi

RE: [PHP-DB] index.html or index.php

2006-09-28 Thread Shaun A Riches
Title: RE: [PHP-DB] index.html or index.php echo "I am currently viewing " . $_SERVER["REQUEST_URI"]; ?> REQUEST_URI and a simple string manipulation will help you. ___ Shaun Riches Computer Science Student -Original Message- From: Ro

RE: [PHP-DB] Array

2006-09-29 Thread Shaun A Riches
$myString); // do stuff here with your array ?> How is that? ___ Shaun Riches Computer Science Student http://www.sh4un.co.uk -Original Message- From: Ron Piggott (PHP) [mailto:[EMAIL PROTECTED]] Sent: Fri 29/09/2006 16:21 To: PHP DB Subject: [PHP-DB] Array If I h