Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Specify A Value For At Least One Of The Colums


i have created a database for a form to hold peoples details who come to my marquee site. i have done most of the entrys as varchar and set null to not null and dont know what to put int he default so left it blank! i have connected to teh db in dreamweaver thts all fine but when i try to insert record i get please specify a value for at least one column.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Sort By 2 Colums As 1
I have 2 tables lets say called: files and notes
files has 2 fileds filname and date_added
notes has 2 fields note subject and date_added

if files had 2 records:
1) file1.pdf : 2007-06-14
2) file2.pdf : 2007-06-17

if files had 2 records:
1) great day out : 2007-06-15
2) why me? : 2007-06-18

i want to sort by the date in both fields but as if they were in 1 fields so output would be
2007-06-14
2007-06-15
2007-06-16
2007-06-17
and not
2007-06-14
2007-06-17
2007-06-15
2007-06-18

Possible To Shift And Splice Colums?
In MYSQL is it possible to shift and splice colums?
say I have a table w/fields: name | tele_num | age
and I get all the addresses later - address initally
stored in a txt type file with 1 rec /line.
I now want: name | address | tel_num | age
Can I do it this? if not can I do:
name | tele_num | age | address ?

Just need the tools cmds to use and the "flow"
you don't have give the actual SQL unless you want.

Show Colums" With A Where
I would need to know if there is a way to filter a Show Columns. The thing is I want to let my customers modify all the fields except the primary key. But since I may not always be the DBA I cannot create the field with the same name. So I need to determine if it's the primary key and if so, I will not show it.
Also I cannot work with views because I will not always be the DBA and also because it would require to create as much views as there will be tables.
So is there a way to inlcude a Where in the statement? If not, is there a command to determine if the field is the primary key?

Query To Display The Rows As Colums Is Not Working!!
I want a select query to get two columns. but i need to get these columns one below the other that is consider that i have a table student in that i have 2 columns name mark.
Now i want the result as

Name Raj Rina Tina
Marks 80 90 70

I tried the --vertical option of mysql and G option in the query.

for example when i tried

select *from studentsG

it displayed

*********** 1. row ***********
name: Raj
marks : 80
********** 2. row ************
name: Rina
marks : 90
********** 3. row ************
name: Tina
marks : 70

but i want to display

Name Raj Rina Tina
Marks 80 90 70


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