Go Back   Sports Car Forum - MotorWorld.net > Hobbies and Leisure Time > Computers, Consoles, Gadgets And Gizmos



Reply
 
Thread Tools Display Modes
Old 10-12-2004, 09:31 AM   #1
stracing
Regular User
 
Join Date: Jun 2003
Location: Sydney, Australia
Posts: 1,901
Default Any PHP/MySQL experts?

i'm just having a small problem.

i'm trying to enter about 30 data elements all at once but it seems mysql won't let me. could it be because it has a maximum command length? i tried searching on the web and nothing has came up

anyone have ideas what to do?

my idea was to use insert and then update. but would that affect data being changed accidently?
__________________
Two rules for life:
1. Don't tell people everything you know.
2.
stracing is offline   Reply With Quote
Old 10-12-2004, 09:37 AM   #2
bondw23
Regular User
 
Join Date: Mar 2004
Posts: 23
Default

is there no error being given when you try to run the query ?
bondw23 is offline   Reply With Quote
Old 10-12-2004, 09:44 AM   #3
stracing
Regular User
 
Join Date: Jun 2003
Location: Sydney, Australia
Posts: 1,901
Default

no because i'm running it in my php script

but i copied and pasted into my mysql window and even then the whole command doesn't fit

my code is like $num=(insert into db (data1, data2,...data30) values (data1, data2,...data30);

when i copy that into mysql window it cuts off at about 'values'
__________________
Two rules for life:
1. Don't tell people everything you know.
2.
stracing is offline   Reply With Quote
Old 10-12-2004, 11:13 AM   #4
stracing
Regular User
 
Join Date: Jun 2003
Location: Sydney, Australia
Posts: 1,901
Default

programming is a bitch...just like women so god damn picky!!!!!!

i copied and pasted my code here and there and double checked my syntax was correct but nooooooooooooooooooo it doesn't work

instead i had to type out every single god damn mot#$#@#$%#@ing letter out and then it worked

fucking son of a bitch!!!!

sorry for the mild use of profanity
__________________
Two rules for life:
1. Don't tell people everything you know.
2.
stracing is offline   Reply With Quote
Old 10-12-2004, 12:03 PM   #5
XTwinTurboVR4X
Regular User
 
Join Date: Dec 2003
Posts: 49
Default

eh no problem.. php/mysql drives me nuts too sometimes (also still learning it) , but generally errors are typo's I made or wrong syntax :-|
__________________
My car: 1994 Mitsubishi 3000GT VR4 with standard removable glass top

Performance Numbers: 465awhp/482ft-lbs @ 24psi or ~550 flywheel horses.
Performance Modifications: AAM Air Intakes, AAM Fuel Rails, AEM EMS, ATR Downpipe, ATR Test Pipe, Blitz SBC-id, Blitz Power Meter, Blitz Turbo Timer, Borla Catback Exhaust, Brembo Rotors, Chrome Y-Pipe, Eibach Ground Control Coil 2.0" Drop, Fidanza Fly Wheel, Goodrich Steel Braided Brake Lines, Cusco Rear Strut Bar, Greddy boost/EGT/Fuel-Air gauges, Gutted Precats, HKS Intercoolers, HKS Intercooler Hard Pipes, HKS Hi-Flow Fuel Pump, HKS DLi Ignition, HKS Sequential BOV, Accel Wires, NGK Spark Plugs (0.033"), RPS Stage-3 Sprung 6-disks Clutch, SMC alchohol kit, T.E.C Front Strut Bar, Dynamic Racing 650R Turbochargers, 720cc injectors, Spec-800 Race Engine built by AAM with JE forged pistons/Crower forged rods.

Non-Performance Mods: 94VR4 to 98VR4 conversion, HID headlights, Konig Villains 18x9, Kumho 265X18X35, Real Leather Shift Knob Cover, Synthetic fluids. Polished by Dave Best: Manifold, HKS intercooler pipes, exhaust covers, 3000GT VR4 spark plug cover.

Powder Coated Red by Dave Best: Valve Covers
XTwinTurboVR4X is offline   Reply With Quote
Old 10-13-2004, 03:36 AM   #6
The Transporter
Regular User
 
Join Date: Jan 2004
Location: Mons > Belgium
Posts: 257
Default

Usually SQL query in php are constructed like that:
Code:
$sql = "INSERT INTO my_db (name,firstname,sex)
	VALUES ('$name','$firstname','$sex')";
$con = mysql_connect($host,$login,$password);
mysql_select_db($base);
$result = mysql_query($sql);
// Parse it now

while ($row = mysql_fetch_object($result))
	{
	echo "$row->name,$row->firstname,$row->sex 
";
	}
mysql_close($con);
If you need more help, just ask :p

PS: If you dont see me around these days it's because I have a montain of work .... But be sure, I'll be back soon, I have alot of pics to show
__________________

PS: Sorry for my poor english !
Cheers,

[Canon EOS 20D]
[Canon EF 28-135 IS USM]
[Canon EF 70-200 F/2.8 L IS USM]

-Pol-

The Transporter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump