Hey have you checked thi
shttp://www.geocities.com/jahan.geo/mysql_c_by_example.html?
Matthew Boehm wrote:
What is the best way to access a specific field in C? Its really easy in
PHP...
PHP
---
$res = mysql_real_query($mysql,SELECT col1, col2 FROM table);
while($row = mysql_fetch_row($res))
What is the best way to access a specific field in C? Its really easy in
PHP...
PHP
---
$res = mysql_real_query($mysql,SELECT col1, col2 FROM table);
while($row = mysql_fetch_row($res)) {
print $row['col1'];
print $row['col2'];
}
Is the only way/best way to do the above in C by using
Hello,
In C you dont have named access to the columns as they
are returned as an array of char*. The only solution
would be to access it using its index value.
Like PHP, you have to do mysql_fetch_row() anyway.
After that access the row by its index.
If you prefer named access and dont mind a
Dear Matthew,
PHP
---
$res = mysql_real_query($mysql,SELECT col1, col2 FROM
table); while($row = mysql_fetch_row($res)) {
print $row['col1'];
print $row['col2'];
}
Is the only way/best way to do the above in C by using a
nested for-loop?
Ex:
fields =
Matthew Boehm wrote:
What is the best way to access a specific field in C? Its really easy in
PHP...
http://dev.mysql.com/doc/mysql/en/mysql_fetch_row.html
you won't have the hash-table feature offered by PHP, but nothing stop
you to do the same.
PHP
---
$res = mysql_real_query($mysql,SELECT