This is the code I got so far:
i=1
inputfile="data.txt"
cat $inputfile | while read the_data; do
while [ $i -le 100 ]; do
echo "UPDATE table SET row=\"$the_data\" WHERE ID=$i;"
i=$(( $i+1 ))
done
done | mysql -u root -pMY_PASS db_name;
This code partially works, but the problem is that the first line in data.txt is inserted into each row instead of new data lines into the right one.
Any ideas?
Duh, fixed it:
i=1
inputfile="data.txt"
cat $inputfile | while read the_data; do
echo "UPDATE table SET row=\"$the_data\" WHERE ID=$i;"
i=$(( $i+1 ))
done | mysql -u root -pMY_PASS db_name;
:-)
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I generated a MySQL database using Doctrine with Symfony and had to modify one table, by extracting two of its attributes and assign them to a new EntityThe first entity is called "Area" and the second one is called "Formato"
Question semi-solved/narrowed downRead the EDIT/UPDATE