Moron question

drf1229

New Member
Messages
71
Reaction score
1
Points
0
I am a programmer of many languages but I have a few issues. I want to learn sql code but have no idea where to input it! Do I make files or is there a program I use? Please, captain obvious point it out to me... Thanks in advance!
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
well you can run it manually from PHPMyAdmin

or make a script to run it once an action has been completed in PHP, there are also other languages available, but i think this is the most popular
 

drf1229

New Member
Messages
71
Reaction score
1
Points
0
there are also other languages available, but i think this is the most popular

I usually use PHP and files instead of SQL but I felt like I should learn how to use SQL. Thank you for your advice!
 

hezuo

New Member
Messages
174
Reaction score
0
Points
0
another silly question... can you create store procedures via phpmyadmin? (real noob here)
 

espfutbol98

New Member
Messages
200
Reaction score
2
Points
0
yeah, you write commands in sql code and insert them in phpMyAdmin or have them in php files
 

drf1229

New Member
Messages
71
Reaction score
1
Points
0
Thank you so much for your replies! I feel like such an idiot now...
 

pythondev

New Member
Messages
59
Reaction score
0
Points
0
P.S.

phpMyAdmin will echo the SQL that it uses for each CREATE,INSERT, UPDATE, etc comand, good idea to copy it down...

then you can use it later for your php, just change the WHERE something='something' to something='".$value."' like that...

Have fun....
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
then you can use it later for your php, just change the WHERE something='something' to something='".$value."' like that...
Better yet, use prepared statements: change statement to "... WHERE something=:something ...". PHP code looks like:
PHP:
$stmt = $db->prepare('... WHERE something=:something ...');
$stmt->execute(array(':something', $value));
 
Top