PDA

View Full Version : dataset Class v2.4


davidj
07-25-2007, 10:30 PM
ok guys i am progressing with this Class

I have added an INSERT function into any table of your database you define in the SQL. It auto detects auto-increments and omits the INSERT function for that field

im having trouble with my CSS. I have defined <div>'s with ID's (you can see this when you run the class and view source) and i asumed you could target these elements using div#id{} syntax but i cant get it to work. Need some help with this and would be greatful if any CSS guru could add some working styles for the form

things you need to know

contents...

class.php //<< the engine
testClass.php //<< the working page
tester.css //<< CSS


Just open the testClass.php and tweak the following and run it


include('class.php'); //<< include the engine (dont touch)
$newCon = new Connector; //<< create the object (dont touch)
$newCon->plugin('localhost','database','username','password '); //<< amend for your own requirements
//////////////////////////////////////
// edit these ////////////////////////
$query1 = "select * from table"; //<< sql query here. Write yours here
$recordsPerPage = 10; //<< records to display. Change to suit
$insertRecords = true; //<< add records function (true/false)
//////////////////////////////////////
//////////////////////////////////////


there is no need to edit the following

// place inside the body tags. Nothing to edit here (dont touch)////
echo $newCon->sqlQuery($query1, $recordsPerPage, $_GET['page'],$insertRecords,'1');
///////////////////////////////////////////////////////

Can someone help with the CSS so i can move onto update and delete functions. If any div tag is incorectly id'd please let me know and i will sort it

edbr
07-26-2007, 05:59 AM
not clear what you want but adding this to tster .css will give some style

#formfields {
width:600px;
overflow:scroll;
height:auto;
clear:left;
background-color:#CCCCCC;
}

davidj
07-26-2007, 06:04 AM
need someone to run the class, examine the source, create a nice theme.

use the CSS file which is packaged and return it to me complete with theme and ill give you a mention in the credits

also i have used a table to layout the fields. should i wrap a div around every element instead of using the table? giving total control

did the new functionality work for you ed

edbr
07-26-2007, 08:37 AM
yes it worked fine.
I was wondering if the results could be entered into a div3 row with each record into a class instead of tables. I tried, but so far I got bogged down in the code.

I found that in a database with a lot of fields it makes a long read .
I put your class to work on a domain I am not using for now I will add the new later as I am having connection problems.
see pm

davidj
07-26-2007, 08:47 AM
I was wondering if the results could be entered into a div3 row with each record into a class instead of tables

so remove tables alltogether?

is that wise when dealing with tabular data?

I found that in a database with a lot of fields it makes a long read .


not if you write your SQL like...

select field1, field2, field3 from table

this will only display 3 fields

edbr
07-26-2007, 08:57 AM
select field1, field2, field3 from table
yes I did that but when inserting all fields, is when it could get long.

davidj
07-26-2007, 10:11 AM
so do you want all fields to be in their own seperate <div>

edbr
07-27-2007, 06:03 AM
Not sure must but if that is possible it might be more flexible.
an alternative might be a vertical display of records(?).
I hope i am not making too much fuss about this.

2bz2p
10-09-2008, 12:10 AM
This is Amazing It will take a while for me to decipher and take in but amazing and usefull.

2b

davidj
10-09-2008, 05:56 AM
this got as much recognition as my extention did

its very lonely being a programmer

ho hum.....

think we should have a "love a programmer" day!

edbr
10-09-2008, 06:08 AM
I thought indianleo liked you a little bit :)

domedia
10-09-2008, 06:28 AM
I thought indianleo liked you a little bit :)
Loved by everyone!
How do you make a myspace site? PLZ step by step instructions for code.

davidj
10-09-2008, 06:29 AM
indianleo was a good guy

just never learnt from the problems he encountered which frustrated people

ask question week1

ask same question week 3

ask question again week 7

same again week 150

a good guy over all

2bz2p
10-09-2008, 04:41 PM
indianleo was a good guy

just never learnt from the problems he encountered which frustrated people

ask question week1

ask same question week 3

ask question again week 7

same again week 150


I work with people like that and I always seem to make them cry and get told by the boss to know my audience. :roll: