[nycphp-talk] MySQL table updating
David Krings
ramons at gmx.net
Wed Dec 5 17:07:34 EST 2007
PaulCheung wrote:
> I am using the MySQL Update for the first time and do not think I am
> doing it correctly. I have checked coding examples and my coding (to me)
> looks correct. but am not updating my table and I cannot see what it is
> I am doing wrong.
Does it generate an error when you paste the resulting query into the MySQL
Query Browser? When I craft queries I often test them first using the query
browser. That way I can find out much quicker what is going wrong and modified
the query there and test again before changing it in code.
Just looking at things I cannot see anything wrong, but pipe it into the query
browser and see what happens. If you don't like the MySQL tools, take a look
at EnginSiteSite's MySQL client. What MySQL splits into three tools is in
EnginSite's single client.
Also, when looking at the table, did you refresh the view? If you use the
MySQL query browser to look and edit the table values you need to refresh the
query result to see any changes.
Regardless of all that, you can write echos just like this:
echo 'Some text';
or if you ever happen to use the \n and don't want to make sure that you don't
forget to use the " for that case, just use the " all the time as in
echo "Some text";
And make use of concatenating strings when you want to output an entire block,
such as
echo "Line 1".
"Line 2".
"Line 3";
Which is what you already do with the break tag. You can also concatenate
strings with it. I also use the echo for small pieces of static HTML as I find
that to be easier to deal with than having the >?php ?> tags floating around.
Yes, it is slower, but I guess for our pruposes we can spare that millisecond
for now.
David
More information about the talk
mailing list