Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Fri Nov 12, 2004 7:12 am Reply with quote

Im sure some knows this..
i dont need a "something like this.....example"
i need a working version and im sure someone has the knowledge to make one.
Hate to ask this at phpnuke.org cause no one is willing to help out(yeah that d*** honesty) Twisted Evil
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Nov 12, 2004 7:45 am Reply with quote

I already answered this in http://www.ravenphpscripts.com/postp25809.html#25809 , but I will repeat it here
Raven wrote:
Create a text file with all columns filled in, separated by a ,. For safety, enclose all values in " ". Since field1 is an autoincrement, in your text file use NULL (no quotes) as the value. Then, use this syntax to load it:

LOAD DATA INFILE '/tmp/filename.csv' INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3,field4,field5,field6);


You create a csv file by opening a text editor and inputting the values that go into the table in a single row for each record separated by commas and all strings enclosed in quotes. Let's say your table has 3 columns
id (Numeric, NOT NULL, autoincrement)
userfname (char(25))
userlname (char(25))

So, your csv would look like this with as many records as you want to add
NULL,"Hit","Walker"

The use phpMyAdmin and execute the LOAD statement pointing it to the location of your file.

On a side note, I would strongly suggest that you get a good book on PHP and MySQL. Also, start familiarizing yourself with the online manuals at http://php.net and http://mysql.com . BTW, your post has a sarcastic tone to it. That last line comes across like a veiled threat or something. You always have the option of going wherever you want to get help Smile
 
View user's profile Send private message
hitwalker







PostPosted: Fri Nov 12, 2004 7:57 am Reply with quote

no absolutely no sarcasm....
but just frustration of the lack of response i get ...not just here but all forums are the same.(and under different names)
thats why i posted it to pay for it....
i know your trying to help raven but this doesnt work....
i need a complete working version to do this....so i only have to change the artist or songtitle....

So yeah raven im also a little bit suprised in your response as well.
yesterday you caught me on..."this was what you asked for".....but you cant say this is simular....my question was well defined this time....
Im over 40 and not in the mood or have that interest learning php ,i do more things so ....

So i gave enough info and i need a fully working file and the only thing i wanna do i change the artist stuff....so thats close to doing nothing about it.....
 
hitwalker







PostPosted: Fri Nov 12, 2004 8:04 am Reply with quote

So this is the table.....

Code:


CREATE TABLE `hits` (
  `id` int(11) NOT NULL auto_increment,
  `titel` varchar(250) NOT NULL default '',
  `artiest` varchar(250) NOT NULL default '',
  `label` varchar(150) NOT NULL default '',
  `hp` smallint(6) NOT NULL default '0',
  `aw` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=74 ;




and these are the lines that need to be added...

So for example ...
Something Heavy Going Down is the titel and goes into titel and Golden Earring is artist and should go into artist.....

lets call this cd1 and should go in "label"...
hp...and....aw arent used...


    Something Heavy Going Down - Golden Earring
    Matt's Mood - The Breakout Crew
    What Is Love - Howard Jones
    Shout - Tears For Fears
    What's Love Got To Do With It - Tina Turner
    Solid - Ashford & Simpson
    When You Look Into My Eyes - Cherelle
    Just The Way You Like It - S.O.S. Band
    Feel So Real - Patrice Rushen
    Somebody Else's Guy - Jocelyn Brown
    Selfcontrol - Laura Branigan
    Tanzen Mit Righuera - Righeira
    Ain't Nobody - Rufus & Chaka Khan
    Loveride - Nuance
    Stop Bajon - Tulio De Piscopo
    S & M - De De
    Hyperactivate - Thomas Dolby
    Dancer - Boogie Boys
    Sweet Somebody - Shannon
    Breakdance - Zodiac Boys
    Beat Box - Art Of Noise
    Matt's Mood - Matt Bianco
    Change Of Heart - Change
    Loverboy - Billy Ocean
    One Night In Bangkok - Murray Head
    One Night In Bangkok - Robey
    Hang On To Your Love - Sade
    Step By Step - Jeff Lorber feat. Audrey Wheeler
    This Is My Night - Chaka Khan
    You Used To Hold Me So Tight - Thelma Houston
    Push In The Bush - Claire Hicks & Love Exchange
    I Can Dream About You - Dan Hartman
    Land Of Hunger - Earrons
    You Are In My System - American Gypsy
    The Night - Valerie Dore
    What Goes On - Mai Tai
    Body & Soul - Mai Tai
    Kalimba De Luna - Boney M
    Medicine Song - Stephanie Mills
    Automatic - Pointer Sisters
    Down On The Street - Shakatak
    Treat Her Like A Lady - Temptations
    Lucky Day - Harold Melvin & The Bluenotes
    Class Style (I've got it)- Linda Lewis
    Sex-o-matic - Barkays
    Carribean Queen - Billy Ocean
    European Queen - Billy Ocean
    African Queen - Billy Ocean
    What Do I Do - Galaxy & Phil Fearon
    Wood Beez - Scritti Politti
    Absolute - Scritti Politti
    Cryin'like A Wolf - Rj's Latest Arrival
    Zorro - My Mine
    Feel The Drive - Doctor's Cat
    I'll Be Around - Terri Wells
    Doctor Love - First Choice
    I Love The Piano - Claudio Simonetti
    Uprock - Rocksteady Crew
    Calling Mr. Telephone - Answering Service
    Lost In Music - Sister Sledge
    Relax - Frankie Goes To Hollywood
    We Are The Young - Dan Hartman
    There Is No Stoppin' Us - Ollie & Jerry
    Reach (Out Ever Lasting Lover) - Unlimited Touch
    The Mexican - Jellybean
    White Lines - Grandmaster Flash & Melle Mel
    Let It All Blow - Dazz Band
    Such A Shame - Talk Talk
    Lovelite - O'Brian
    Precious Little Diamond - Fox The Fox
    Florida - Paul Sharada
    My Heart's Divided - Shannon
    Dance Machine - Roni Griffith
    The War Song - Culture Club
    The Wild Boys - Duran Duran
    Running - Gwen Presley & Portable Control
    Dr. Beat - Miami Sound Machine
    Ghostbusters - Ray Parker Jr.
    Black Stations, White Stations - M & M
    Sexcrime (1984) - Eurythmics
    Bodyrock - Maria Vidal
    You Are The One For Me - Paul Hardcastle
    The Second Time- Kim Wilde
    Shot In The Dark - Michael Zager
    Jungle Love - The Time
    Watching You - Shakatak
    Like A Virgin - Madonna
    They Only Come Out Of Night - Peter Brown
    Don't Go Loose It Baby - Hugh Masekela
    Say Yeah! - The Limit
    Miss me blind - Culture Club
    Color My Love - Fun Fun
    Sex Shooter - Appolonia Six
    Let's Hear It For The Boy - Deniece Williams
    Shaft - Eddy Conrad
    The Game - Peter Brown
    I Feel For You - Chaka Khan
    Erotic City - Prince
    S.O.S. Fire In The Sky - Deodato
    Somebody's Watching Me - Rockwell
    In The Evening - Sheryl Lee Ralph
    Glamorous Life - Sheila E.
    When Doves Cry - Prince
    Tour De France - Kraftwerk
    The Reflex - Duran Duran
    Two Tribes - Frankie Goes To Hollywood
 
Raven







PostPosted: Fri Nov 12, 2004 8:11 am Reply with quote

I don't know what else to tell you. In my last post I told you exactly, in detail, how to design your file and how to execute the MySQL to load the table. And your quote about having no interest ..., most of us have day jobs too, and families, and a life outside of PHP. I am 54 and continue to learn in order to better myself and make myself more valuable to my employer and/or next employer. I just ask that you take some time to read what I have posted and when I suggested that you get a book on PHP/MySQL I was not suggesting that you have to learn PHP/MySQL, I'm just suggesting that you could get a better understanding of PHP and MySQL.
 
hitwalker







PostPosted: Fri Nov 12, 2004 8:23 am Reply with quote

well i can understand that raven but it is just a problem at this moment.
i can learn this better when i have a complete working version.
but why the story...we all have lives ?
im not ?.....
I have my work,i have my obligations,things people expect from me,giving support on things i know....
If one of my members has a problem im not gonna tell him.....come on dude give it a try ......do this do this.....if it doesnt work call me on new years eve....
to my opinion thats not support,thats teaching and im not asking for lessons.
im asking for a full working version that i can use everytime by changing the lines of artist and songtitel...and cd name what is ....label.

so you could have presented a full working version by now with the info i posted but you didnt.....and that makes topics like this to long and frustrating...
 
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Fri Nov 12, 2004 9:23 am Reply with quote

Quote:

im asking for a full working version that i can use everytime by changing the lines of artist and songtitel...and cd name what is ....label.

<rant>
You must understand that this is too much to ask for in the forums here. We can add this to a requests topic but for Raven or anyone else to take on a project for everyone who comes in and needs one is way above and beyond. I could see working out a MySQL statement or 2 but to expect us to write your module for you is way beyond our resources. Could we? Yes without a doubt. But if we do this for you then we are expected to do the same for each and every person who comes here. Not even web hosting customers expect to be taken care of that well!

Beyond that help we're here to give general support yes. But there are limits. Consider what is offered and maintained here. Just keeping up with legitimate bug reports and expanding the projects we collectively and individually maintain is enough to keep us all busy for the next decade or so!

That and there are several modules around that are very nearly what you are looking to create that have support for their users.

Play lists, Downloads, MP3 libraries and so on. So while your issue of the moment is your priority it cannot in this case be ours.

If your totally stuck post the project in the for hire forum and see if someone has the time and desire to work it out for you. I'd say your looking at a couple of hours of someones time to get it all straight beginning to end. Typically $75-$130 depending on specifics to cleanup a module like this.

I'm only here because one of my daughters is sick and I couldn't work today. So between washing puke out of pails and bedding I put a few minutes into working on issues raised here in the forums.
</rant>

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
hitwalker







PostPosted: Fri Nov 12, 2004 9:34 am Reply with quote

well its just a question.....
and this has nothing to do with phpnuke.
but its confusing...
like ravens explains in a few lines how it should work and for the coders its like.....couple of hours and upto... $75-$130
so thats 2 different...views on how long this would take....
and if i dont know nothing about this,even a person without any knowledge knows this isnt that difficult for a programmer...
but im hoping that someone would see and realise that this is just as important to me as another member with a mod that doesnt work.
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Fri Nov 12, 2004 10:13 am Reply with quote

Six is definitely correct - this is a volunteer forum, and what you're asking for is more than volunteers can be expected to provide. I'm not surprised that Raven has already gone to great lengths to try to Only registered users can see links on this board! Get registered or login!. Most who post here are willing to act on Raven's advice. It's OK that you don't seem willing to do it yourself and you're willing to pay someone, but I'd suggest this isn't the best place for finding paid assistance.

The problem isn't whether it will take a couple of hours to do it, but that "it" changes frequently - and that would require MUCH extra effort. So your expectation about what it would cost to pay someone to do this for you would not be realized.

I'd suggest posting a request on one of the freelance forums (e.g. http://nukelance.com) to see if you can find a developer there. But I'd also suggest you define your requirements as carefully as possible before doing that, so the freelance developer understands exactly what you're looking for.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
hitwalker







PostPosted: Fri Nov 12, 2004 10:23 am Reply with quote

well what needs to be done and with what is posted very clearly....
but its posted several times on large,small and big forums so il se who responds and has the knowhow to fix this.
and raven will apreciate it from you posting the donations link,and whitch i should use but i still dont have anything so a donation would be kind off weird to me....
 
Raven







PostPosted: Fri Nov 12, 2004 12:24 pm Reply with quote

Weird? That would imply that this site has never been of any help to you before now. Now that's "weird" RTM

Seriously hitwalker, I have shown you how to code your csv file and I have shown you how to make the call using phpMyAdmin. I honestly do not understand how/why you can say that I, or anyone else, have not answered you?
 
kguske







PostPosted: Fri Nov 12, 2004 12:26 pm Reply with quote

My point is that what you want wasn't what you described in your original post - and I'm sure it's clear in your mind, but it's possible that it might change again before someone finishes developing it for you.

If you were frustrated because no one responded, maybe it wasn't reasonable to expect someone to respond in the forums where you posted. Again, this is a volunteer forum, and there are places where you can pay to get a response (or even complete modules developed).

But Raven DID respond here, he DOES have the know-how to create this, and he GAVE you plenty of assistance. You could use that assistance by pointing a freelancer (or someone on one of the other forums you posted on) here for details, which would likely result in that person being able to get the job done more quickly and costing you less. You could also appreciate the detailed responses he gave, and his patience in answering them. If donating for assistance feels weird, I think a simple thank you would suffice.
 
hitwalker







PostPosted: Fri Nov 12, 2004 1:21 pm Reply with quote

well you getting it wrong kguske,and perhaps im not clear in a few things.
first i am gratefull for help i get here and im sure members are gratefiull for the help i can give them ....how small it may be...

but what i dont understand why this has to be a discussion...
im dutch ,im honest and im famous for it....probably because im dutch....but that can also cause things to be explained the wrong way.
raven did give his way of howto ....but im still dutch so i understand technical things differently....

so should i lie here kguske?..
but i think someone already could have posted the simple script here but its a point of not willing to.
long before i started with phpnuke i was more busy with other cms and run into some simular problems and asked a programmer for help,just a guy i didnt knew...
and wanna know what he said..?.....
why should i help you,i learned years for this and you expect me to help you out...

well ive never forgotten that kguske....
And yes it probably would be a good question...
why should raven make the simple load data infile script or even help?

its ok if nobody helps out,thats fine.
im just different and im proud of it,i always help another person and its not always about money....
a few days ago ive spend a few hours and the next day getting a members site running again.....that was a member of .ravenphpscripts....not even mine...
and thats what i mean with helping each other and not only when its conveniant....
 
kguske







PostPosted: Fri Nov 12, 2004 3:22 pm Reply with quote

Well, ok, now I am confused. It's great that you are willing to help others, and I hope they appreciate it. I said nothing about lying or honesty. Raven was willing and tried to help you without expecting anything, but you wanted something different. I suggested looking in another place for that type of help and thanking Raven for at least trying to help (which I think you did for the first time on this thread in the last post). Yet, you still say it's OK if no one helps you, as if Raven did nothing. What did I get wrong?
 
hitwalker







PostPosted: Fri Nov 12, 2004 3:41 pm Reply with quote

the part of not being gratefull....
and what is so different in what i ask ?
and as for honesty....you just mentioned it..."if no one helps you"..
im just curious about why...?
if someone has the knowledge...why doesnt he help ?
thats something to think about.
but im wondering why im having this discussion....
this a typical sample of killing a topic,.....cause nobody is gonna read this anymore.
 
hitwalker







PostPosted: Fri Nov 12, 2004 3:43 pm Reply with quote

and a sample of the script i need and comes close is this....
found that after 2 days of searching....

Code:


<?php
include ("db_connect.php");
?>

<?php
mysql_query("LOAD DATA INFILE '/usr/local/psa/home/vhosts/prinsenhuis.nl/httpdocs/maanden.csv' INTO TABLE `kalender` FIELDS TERMINATED BY ';' LINES TERMINATED BY '\r'") or die (mysql_error());

?>


the info isnt mine but this should be difficult or takes to much time ?
 
kguske







PostPosted: Fri Nov 12, 2004 4:15 pm Reply with quote

Please re-read the thread. Until I suggested it, you showed no appreciation, only complained that no one was helping you, even though they clearly were, or, if you cannot accept that, you must admit they tried.

Several people already answered your questions - how to do what you said you wanted, what is different about your request for help, why they might not help (nothing to do with honesty), where you might find help, etc. Incredibly, that STILL isn't enough, and THAT killed the topic, thus I will say no more about this.
 
hitwalker







PostPosted: Fri Nov 12, 2004 4:24 pm Reply with quote

the only thing that comes out of this is that my posts are given a big boost.
and that its turned into a discussion....

the topic started as....."Anyone knows how to make a load data infile ?"

and my first lines are.....
"i dont need a "something like this.....example"
i need a working version "

so i was perfectly clear on what i wanted....

and yes raven was helpfull and posted but i clear that i needed fully working stuff....
so i was clear enough.....
 
Raven







PostPosted: Fri Nov 12, 2004 4:26 pm Reply with quote

And I repeat. You did NOT have to have a php script for this. You could have taken the statement I gave you and just dropped that into phpMyAdmin SQL panel and voila! It's loaded. You have beaten this to death when had you done what I first propsed you would be having a cold beer/soda and watching TV right now ROTFL
 
hitwalker







PostPosted: Fri Nov 12, 2004 4:41 pm Reply with quote

ahh raven your probably right...but i dont understand it.....how weird it may sound to you.
some people unstand it in a second and others need to have or see a ready to use sample to understand...
and im not to proud to say im to stupid to understand it like you want me to.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©