faq/databases.xml
b8e1b1357def73f310c9f7405035b3acc0cb1eaf
...
...
@@ -38,11 +38,6 @@
38
38
</question>
39
39
<answer>
40
40
<para>
41
-
Yes. You already have all the tools you need if you are running
42
-
entirely under Windows 9x/Me, or NT/2000, where you can use
43
-
ODBC and Microsoft's ODBC drivers for Microsoft Access databases.
44
-
</para>
45
-
<para>
46
41
If you are running PHP on a Unix box and want to talk to MS Access
47
42
on a Windows box you will need Unix ODBC drivers.
48
43
<link xlink:href="&url.openlink;">OpenLink Software</link> has Unix-based
...
...
@@ -150,76 +145,6 @@
150
145
</para>
151
146
</answer>
152
147
</qandaentry>
153
-

154
-
<qandaentry xml:id="faq.databases.mysql.deprecated">
155
-
<question>
156
-
<para>
157
-
Why is the MySQL extension (ext/mysql) that I've been using for over
158
-
10 years discouraged from use? Is it deprecated? What do I use instead?
159
-
How can I migrate?
160
-
</para>
161
-
</question>
162
-
<answer>
163
-
<para>
164
-
There are three MySQL extensions, as described under the
165
-
<link linkend="mysqlinfo.api.choosing">Choosing a MySQL API</link> section. The old API
166
-
should not be used, it is deprecated as of PHP 5.5.0 and has been moved to PECL as of PHP 7.0.0.
167
-
You are strongly encouraged
168
-
to write all new code with either <link linkend="book.mysqli">mysqli</link> or
169
-
<link linkend="ref.pdo-mysql">PDO_MySQL</link>.
170
-
</para>
171
-
<para>
172
-
Migration scripts are not available at this time, although the mysqli API contains both
173
-
a procedural and OOP API, with the procedural version being similar to ext/mysql.
174
-
</para>
175
-
<para>
176
-
It is not possible to mix the extensions. So, for example, passing a mysqli connection to
177
-
PDO_MySQL or ext/mysql will not work.
178
-
</para>
179
-
</answer>
180
-
</qandaentry>
181
-

182
-
<qandaentry xml:id="faq.databases.mysqlresource">
183
-
<question>
184
-
<para>
185
-
Why do I get an error that looks something like this:
186
-
"Warning: 0 is not a MySQL result index in &lt;file&gt;
187
-
on line &lt;x&gt;" or "Warning: Supplied argument is not
188
-
a valid MySQL result resource in &lt;file&gt; on line &lt;x&gt;"?
189
-
</para>
190
-
</question>
191
-
<answer>
192
-
<para>
193
-
You are trying to use a result identifier that is 0. The 0 indicates
194
-
that your query failed for some reason. You need to check for errors
195
-
after submitting a query and before you attempt to use the returned
196
-
result identifier. The proper way to do this is with code similar
197
-
to the following:
198
-
<programlisting role="php">
199
-
<![CDATA[
200
-
<?php
201
-

202
-
$result = mysql_query("SELECT * FROM tables_priv");
203
-
if (!$result) {
204
-
echo mysql_error();
205
-
exit;
206
-
}
207
-
?>
208
-
]]>
209
-
</programlisting>
210
-
or
211
-
<programlisting role="php">
212
-
<![CDATA[
213
-
<?php
214
-

215
-
$result = mysql_query("SELECT * FROM tables_priv")
216
-
or die("Bad query: " . mysql_error());
217
-
?>
218
-
]]>
219
-
</programlisting>
220
-
</para>
221
-
</answer>
222
-
</qandaentry>
223
148
</qandaset>
224
149
</chapter>
225
150

226
151